You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: leetcode/nim-game.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,6 @@ Both of you are very clever and have optimal strategies for the game. Write a fu
5
5
6
6
For example, if there are 4 stones in the heap, then you will never win the game: no matter 1, 2, or 3 stones you remove, the last stone will always be removed by your friend.
7
7
8
+
Hint:
9
+
10
+
If there are 5 stones in the heap, could you figure out a way to remove the stones such that you will always be the winner?
0 commit comments