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 c03667f commit 7e39738Copy full SHA for 7e39738
lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java
@@ -15,7 +15,7 @@ public String gameResult(ListNode head) {
15
var Odd = new Stack<Integer>();
16
var Even = new Stack<Integer>();
17
// Loop through the linked list to get pairs (so two nodes at a time)
18
-
+
19
// Check each pair of nodes (odd and even):
20
// compare their values
21
@@ -30,3 +30,9 @@ public String gameResult(ListNode head) {
30
31
}
32
33
34
+// Constraints:
35
+// The number of nodes in the list is in the range [2, 100].
36
+// The number of nodes in the list is even. 1 <= Node.val <= 100
37
+// The value of each odd-indexed node is odd.
38
+// The value of each even-indexed node is even.
0 commit comments