Coins in a Line | LeetCode There are n coins in a line. (Assume n is even). Two players take turns ...

Please Visit: http://ift.tt/1ajReyV



Coins in a Line | LeetCode



There are n coins in a line. (Assume n is even). Two players take turns to take a coin from one of the ends of the line until there are no more coins left. The player with the larger amount of money wins.Would you rather go first or second? Does it matter?Assume that you go first, describe an algorithm to compute the maximum amount of money you can win.

http://ift.tt/1phEaow

http://ift.tt/1phEaVu



Coins in a Line | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iGPh4z

via LifeLong Community

No comments:

Post a Comment