We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92891f6 commit 672ce73Copy full SHA for 672ce73
lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java
@@ -8,5 +8,21 @@ public class Lesson12 {
8
*/
9
public String gameResult(ListNode head) {
10
return null;
11
+ //make a linked list
12
+
13
+ //create two variables to count points for "Odd" and "Even"
14
15
+ // Check each pair of nodes (odd and even):
16
+ // compare their values
17
18
+ // add a point to "Odd" if the odd-indexed node is higher
19
20
+ //add a point to "Even" if the even-indexed node is higher
21
22
+ // Decide the winner
23
+ // compare the points after going through both pairs
24
25
+ // Return the name of the winning team or "Tie" if points are equal
26
27
}
28
0 commit comments