We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a268bba commit 56f3192Copy full SHA for 56f3192
1 file changed
src/main/lists/Stack.java
@@ -33,7 +33,7 @@ public Stack(T[] data) {
33
LinkedListNode<T> tail = new LinkedListNode<T>(null, null);
34
tail.next = tail;
35
36
- this.head = new LinkedListNode<T>(null, new LinkedListNode<T>(null, null));
+ this.head = new LinkedListNode<T>(null, tail);
37
38
for (T d: data)
39
this.push(d);
0 commit comments