We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b4a2c6 commit 54ca917Copy full SHA for 54ca917
LinkedList/MergeTwoSortedlinkedLists.java
@@ -1,7 +1,7 @@
1
/*
2
Merge two sorted linked lists
3
4
-You’re given the pointer to the head nodes of two sorted linked lists.
+You’re given the pointer to the head nodes of two sorted linked lists.
5
The data in both lists will be sorted in ascending order.
6
Change the next pointers to obtain a single, merged linked list which also has data in ascending order.
7
Either head pointer given may be null meaning that the corresponding list is empty.
@@ -16,8 +16,7 @@ class Node {
16
*/
17
18
Node mergeLists(Node headA, Node headB) {
19
- // This is a "method-only" submission.
20
- // You only need to complete this method
+
21
Node head = null;
22
Node temp = null;
23
0 commit comments