We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
which is longer than this solution and recursive but makes sense to myself. I'd like to understand the reasoning of the other solution, more specifically this sentence:
mod 7 is taken because max is 5 and min is 2, so at the climax of game atmost 7 cards are left.
Game of Stones
You are viewing a single comment's thread. Return to all comments →
I had the same question and still don't get the answer.
My solution was (dynamic programming approach):
which is longer than this solution and recursive but makes sense to myself. I'd like to understand the reasoning of the other solution, more specifically this sentence:
mod 7 is taken because max is 5 and min is 2, so at the climax of game atmost 7 cards are left.