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 d8c14b9 commit b51637fCopy full SHA for b51637f
lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java
@@ -10,7 +10,7 @@ public String gameResult(ListNode head) {
10
ListNode current = head;
11
int evenPoints = 0;
12
int oddPoints = 0;
13
- while (current != null && current.next != null) {
+ while (current != null) {
14
if (current.val > current.next.val) {
15
evenPoints++;
16
} else if (current.val < current.next.val) {
0 commit comments