No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Coin game: Alice and Bob are playing a game using a bunch of coins. The players pick several coins out of the bunch in turn. Each time a player is allowed to pick 1, 2 or 4 coins, and the player that gets the last coin is the winner. Assume … |
|
given a queue: queue<int> myqueue; write a function to remove the last entry in the queue. remark: you can't use stack, pointers, or linked list to do that. You can only use functions such as myqueue.pop(), myqueue.front() etc... Anyone has any ideas? |
|
given a 2-D maze stored in a 2-D array eg: SWWWW . . . . . W.W.W . . . . F S is starting point F is exit . is the path W is the wall. After the player enters the maze, s/he tries to find a path to … |