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?
Q39
6 Aug 2023
Computational Thinking · Week 5
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?