Engineer 1 Interview Questions

1,033 engineer 1 interview questions shared by candidates

There are n coins on the table forming a circle, and each coin is either facing up or facing down. Alice and Bob take turns to play the following game, and Alice goes first. In each operation, the player chooses a facing-up coin, removes the coin, and flips the two coins that are adjacent to it. If (before the operation) there are only two coins left, then one will be removed and the other won't be flipped (as it would be flipped twice). If (before the operation) there is only one coin left, no coins will be flipped. If (before the operation) there are no facing-up coins, the player loses. Decide who will win the game if they both play optimally. It can be proved that the game will end in a finite number of operations, and one of them will win
avatar

Software Development Engineer (SDE) -1

Interviewed at Flipkart

3.8
Dec 26, 2024

There are n coins on the table forming a circle, and each coin is either facing up or facing down. Alice and Bob take turns to play the following game, and Alice goes first. In each operation, the player chooses a facing-up coin, removes the coin, and flips the two coins that are adjacent to it. If (before the operation) there are only two coins left, then one will be removed and the other won't be flipped (as it would be flipped twice). If (before the operation) there is only one coin left, no coins will be flipped. If (before the operation) there are no facing-up coins, the player loses. Decide who will win the game if they both play optimally. It can be proved that the game will end in a finite number of operations, and one of them will win

Viewing 1021 - 1030 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 1,033 interview questions and reports from Engineer 1 interviews. Prepare for your interview. Get hired. Love your job.