Skip to content

Commit 49fadb6

Browse files
committed
nim game
1 parent f6d2492 commit 49fadb6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Nim Game/Solution.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @param {Integer} n
2+
# @return {Boolean}
3+
def can_win_nim(n)
4+
return (n%4) != 0
5+
end

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Median of Two Sorted Arrays
2828
[Remove Element](https://leetcode.com/problems/remove-element/)
2929
[Implement strStr()](https://leetcode.com/problems/implement-strstr/)
3030
[Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/)
31+
[Nim Game](https://leetcode.com/problems/nim-game/)
3132

32-
33-
- Until 12/5/2016
33+
- Until 3/29/2017
3434

3535
Methods involved
3636

0 commit comments

Comments
 (0)