al-go-rithms
al-go-rithms copied to clipboard
The Bit Game (Bit Manipulation Problem)
This is a(n):
- [x] New algorithm
- [ ] Update to an existing algorithm
- [ ] Error
- [ ] Proposal to the Repository
Details: I would like to add an Algorithm- The Bit Game (Geeks for Geeks Problem).
Description - Two players, Player 1 and Player 2, are given an integer N to play a game. The rules of the game are as follows :
- In one turn, a player can remove any set bit of N in its binary representation to make a new N.
- Player 1 always takes first turn.
- If a player cannot make a move, he loses.
Link - https://practice.geeksforgeeks.org/problems/the-bit-game2313/0