26.05.2023 1140. Stone Game II medium blog post Join me on Telegram https://t.me/leetcode_daily_unstoppable/224 Problem TLDR While Alice and Bob optimally take 1..2*m numbers from piles find maximum for Alice. Intuition For each position, we can cache the result for Alice starting from it. Next round, Bob will become Alice and use that cached result, but Alice will use the remaining part:
# 26.05.2023 [1140. Stone Game II]
# 26.05.2023 [1140. Stone Game II]
# 26.05.2023 [1140. Stone Game II]
26.05.2023 1140. Stone Game II medium blog post Join me on Telegram https://t.me/leetcode_daily_unstoppable/224 Problem TLDR While Alice and Bob optimally take 1..2*m numbers from piles find maximum for Alice. Intuition For each position, we can cache the result for Alice starting from it. Next round, Bob will become Alice and use that cached result, but Alice will use the remaining part: