GoLang Solution For LeetCode Problem: Divisor Game
Solving Divisor Game in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Problem Description
Alice and Bob take turns playing a game, with Alice starting first.
Also, if a player cannot make a move, they lose the game.
Example 1:
Input: 2
Output: true
Explanation: Alice chooses 1, and Bob has no more moves.
Example 2:
Input: 3
Output: false
Explanation: Alice chooses 1, Bob chooses 1, and Alice has no more moves.
Note:
1 <= N <= 1000
See the full details of the problem Divisor Game at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.