Skip to content

Commit 710b3c1

Browse files
author
AmiyahJo
committed
fix: variables "even" and "odd" turned to integers
1 parent 7e39738 commit 710b3c1

File tree

1 file changed

+2
-2
lines changed
  • lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12

1 file changed

+2
-2
lines changed

lesson_12/structs_java/structs_app/src/main/java/com/codedifferently/lesson12/Lesson12.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public String gameResult(ListNode head) {
1212
Queue<Integer> queue = new LinkedList<Integer>();
1313

1414
//create two variables to count points for "Odd" and "Even"
15-
var Odd = new Stack<Integer>();
16-
var Even = new Stack<Integer>();
15+
int Odd = 0;
16+
int Even = 0;
1717
// Loop through the linked list to get pairs (so two nodes at a time)
1818

1919
// Check each pair of nodes (odd and even):

0 commit comments

Comments
 (0)