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 8676acd commit 996dc0aCopy full SHA for 996dc0a
lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java
@@ -7,6 +7,17 @@ public class Lesson12 {
7
* https://github.com/yang-su2000/Leetcode-algorithm-practice/tree/master/3062-winner-of-the-linked-list-game
8
*/
9
public String gameResult(ListNode head) {
10
+ ListNode current = head;
11
+ int evenPoints = 0;
12
+ int oddPoints = 0;
13
+ while(current.next != null){
14
+ if (current.val > current.next.val);
15
+ evenPoints++
16
+ else if(current.val <current.next.val);
17
+ oddPoints++
18
+ else
19
+
20
+ }
21
return null;
22
}
23
0 commit comments