Devise an algorithm that given the array of coins


Question: Consider the following two-player game: N coins c1, c2, ... cN (you may assume that N is even) are placed in a line on a table. Players alternate turns and at each turn a player selects either the first or last coin in the row, removing the coin and keeping it. Devise an algorithm that, given the array of coins, determines the maximum amount of money that player #1 can definitely win.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Devise an algorithm that given the array of coins
Reference No:- TGS02457787

Now Priced at $15 (50% Discount)

Recommended (95%)

Rated (4.7/5)