Skip to content

Commit 14964fd

Browse files
refactor 292
1 parent cf7d1c3 commit 14964fd

File tree

1 file changed

+0
-11
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-11
lines changed

src/main/java/com/fishercoder/solutions/_292.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**You are playing the following Nim Game with your friend:
4-
* There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones.
5-
* The one who removes the last stone will be the winner. You will take the first turn to remove the stones.
6-
* Both of you are very clever and have optimal strategies for the game.
7-
* Write a function to determine whether you can win the game given the number of stones in the heap.
8-
* 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,
9-
* the last stone will always be removed by your friend.
10-
11-
Hint:
12-
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?*/
13-
143
public class _292 {
154

165
public static class Solution1 {

0 commit comments

Comments
 (0)