Coin row
Level 2 of 3
Also called Coin-row problem and Most money with no two neighbours, by dynamic programming.
A row of coins, and you may take any of them except two side by side. To find the most money, answer for the first coin, then the first two, and so on, each answer built from the two before it. Then walk back to see which coins were taken.
the most money from the first coins
- comparisons
- 0
step 1 of 1
Examples