The greedy coins game Dynamic Programming Solution :
Question statement There is a row of 2n coins on the table; each coin can have any positive integer value. Two players alternate turns.
On a player’s turn he/she must take one of the two coins on either END of the row of remaining coins, so with each turn the row gets shorter by one.
After all the coins have been taken, the player with the higher total value is the winner.
Decide Strategy and Determine the maximum possible amount of money we can definitely win if we move first. [Read more…]