Q39.Alice and Bob play a coin-toss game. Each entry in `aList` is `[i, j]`, where `i` is Alice's outcome and `j` is Bob's outcome. Procedure `findWinner(aList)` should return `c`: `0` for Bob, `1` for Alice, and `2` for a draw. Which procedure correctly identifies the winner?
Save
Check
Details
Q39
6 Aug 2023
Q39.Alice and Bob play a coin-toss game. Each entry in `aList` is `[i, j]`, where `i` is Alice's outcome and `j` is Bob's outcome. Procedure `findWinner(aList)` should return `c`: `0` for Bob, `1` for Alice, and `2` for a draw. Which procedure correctly identifies the winner?