Created
September 10, 2023 11:51
-
-
Save codeperfectplus/2accddb27f7596557418c02fbcb4b0f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def compareTriplets(a:list, b:list): | |
| aliceScore = 0 | |
| bobScore = 0 | |
| for i in range(len(a)): | |
| if a[i] > b[i]: | |
| aliceScore += 1 | |
| elif b[i] > a[i]: | |
| bobScore += 1 | |
| return [aliceScore,bobScore] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment