Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
What if we have to merge sorted lists, not Linked Lists

heena.sharma.iiitb

Sep 22, 2023

In the case of sorted lists, to merge them using a heap, I have to maintain a pointer to the list where the smaller element is being taken. In the case of LL it is simple to get the next element using a node.next, but how do we get the next element in the case of lists?

0

0

Comments
Comments

On this page