Skip to content

Commit 56f3192

Browse files
committed
Stack: Fix second constructor
1 parent a268bba commit 56f3192

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/lists/Stack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public Stack(T[] data) {
3333
LinkedListNode<T> tail = new LinkedListNode<T>(null, null);
3434
tail.next = tail;
3535

36-
this.head = new LinkedListNode<T>(null, new LinkedListNode<T>(null, null));
36+
this.head = new LinkedListNode<T>(null, tail);
3737

3838
for (T d: data)
3939
this.push(d);

0 commit comments

Comments
 (0)