You are viewing a single comment's thread. Return to all comments →
So if currA is :- 1->2->2->4 and currB is:- 3->->5->6
The result would be (n= 1->2->2->3->4->5->6)
So "return result.next" would return what?
Why we are not returning the "n" as it is the new merged linked list of "currA" and "currB"?
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
So if currA is :- 1->2->2->4 and currB is:- 3->->5->6
The result would be (n= 1->2->2->3->4->5->6)
So "return result.next" would return what?
Why we are not returning the "n" as it is the new merged linked list of "currA" and "currB"?