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.
- Prepare
- Algorithms
- Game Theory
- New Year Game
- Discussions
New Year Game
New Year Game
Sort by
recency
|
24 Discussions
|
Please Login in order to post a comment
Here is New Year Game problem solution in Python Java C++ and C programming - https://programs.programmingoneonone.com/2021/07/hackerrank-new-year-game-problem-solution.html
Something is missing from the description. It talks about making optimal move but each move is to take an integer from the front of array as it moves along. What do they mean by taking turns? if each must take the first element in the array/queue then how do they make the best choice? There are no choices, they just get the item in the front of the array. I really wish they would edit the descriptions better.
here is problem solution in java python c++ and c programming. https://programs.programmingoneonone.com/2021/07/hackerrank-new-year-game-problem-solution.html
Once you recognize the most important invariant, you can see that there's actually only a few truly distinct possible games, and then it's simple to just go through them manually and check who wins each one.
why it has 5 inputs ?
2 3 7 6 18 1 3
what does other input means I dont understand the use of them.