Gold box problem

There are ‘n’ gold boxes placed in a row, each having different number of gold coins.
2 players play a game, where the motive is to collect the maximum number of gold coins. Each player can see how many coins are present in each box, but can get a box from either end only, on his turn.
Design a strategy such that Player1 wins (Assuming both players play smartly)

Source: Amazon Interview

Find Solution here

Leave a Reply

Your email address will not be published. Required fields are marked *