File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed
lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12 Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,14 @@ public String gameResult(ListNode head) {
17
17
scores [head .val % 2 ]++;
18
18
// Gpt help ended at the line above
19
19
} else {
20
- //else will only be applicable if the previous condition is false
21
20
scores [head .next .val % 2 ]++;
22
- //increments score for the next node value
23
21
}
24
22
}
25
23
head = head .next ;
26
- //reassigns the variable, head, to point to the next node in the list
27
24
}
28
25
if (scores [0 ] == scores [1 ]) {
29
- //checks for a tie
30
26
return "Tie" ;
31
27
} else if (scores [0 ] > scores [1 ]) {
32
- //checks if the even score is greater than the odd like the elif in the python example
33
28
return "Even" ;
34
29
} else {
35
30
return "Odd" ;
You can’t perform that action at this time.
0 commit comments