Skip to content

Commit 54ca917

Browse files
authored
Update MergeTwoSortedlinkedLists.java
1 parent 9b4a2c6 commit 54ca917

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

LinkedList/MergeTwoSortedlinkedLists.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Merge two sorted linked lists
33
4-
You’re given the pointer to the head nodes of two sorted linked lists.
4+
You’re given the pointer to the head nodes of two sorted linked lists.
55
The data in both lists will be sorted in ascending order.
66
Change the next pointers to obtain a single, merged linked list which also has data in ascending order.
77
Either head pointer given may be null meaning that the corresponding list is empty.
@@ -16,8 +16,7 @@ class Node {
1616
*/
1717

1818
Node mergeLists(Node headA, Node headB) {
19-
// This is a "method-only" submission.
20-
// You only need to complete this method
19+
2120
Node head = null;
2221
Node temp = null;
2322

0 commit comments

Comments
 (0)