Skip to content

Commit 028727f

Browse files
committed
"Added assignment of this.tail to newNode in SortedLinkedList class."
1 parent 58390c1 commit 028727f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/thealgorithms/datastructures/lists/SortedLinkedList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ else if (value < head.value) {
3939
}
4040
else if (value > tail.value) {
4141
this.tail.next = newNode;
42+
this.tail = newNode;
4243
}
4344
else{
4445
Node temp = head;

0 commit comments

Comments
 (0)