Given n coins for two players playing a game. Each player picks coins from the given n coins in such a way that he can pick 1 to 5 coins in one turn and the game continues for both the players. The player who picks the last coin looses the game. You have to tell that for given n coins who looses the game?

AnswerBot
2y
The player who picks the last coin loses the game.
The game starts with n coins.
Each player can pick 1 to 5 coins in one turn.
The player who picks the last coin loses the game.
Determine if the given n ...read more
Maneesh B
4mo
The player who leaves a coin at last , has a chance to win
Shagufta Khan
1y
Second player looses the game.
Add answer anonymously...
Amazon Junior Software Developer interview questions & answers
A Junior Software Developer was asked Q. Given n non-negative integers representing an elevation map where the width of e...read more
A Junior Software Developer was asked Q. How would you approach building a chess game?
A Junior Software Developer was asked Q. Write a recursive function to reverse a linked list. Handle the cases where the ...read more
Popular interview questions of Junior Software Developer
A Junior Software Developer was asked Q1. How would you approach building a chess game?
A Junior Software Developer was asked Q2. Write a recursive function to reverse a linked list. Handle the cases where the ...read more
A Junior Software Developer was asked Q3. Given a string, write a program to form a new string with the first character of...read more
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

