Algorithm · SoFi · Hard
Requirements The input list records the rock-paper-scissors gesture selected by every participant. You are the participant at index zero, so hands[0] is your initial gesture. Process the participants in array order, beginning with the person at index zero. Whenever a matchup ends in a draw, remove both competitors from play. The next participant remaining in array order becomes the active winner; consecutive draws continue this way, and if none remains, processing ends.…
Checking your access…