Skip to main content
Merge k Sorted Lists | AlgoCracked
AlgoCracked
ProblemsMerge k Sorted Lists
Hard52.0% acceptance
Blind75Linked ListDivide And ConquerHeapMerge Sort

Merge k Sorted Lists

You are given an array of k linked lists, each sorted in ascending order. Merge them into one sorted linked list and return its head. Input format Input is [lists] , where lists is a JSON array of lists, e.g. [[[1,4,5],[1,3,4],[2,6]]] . Each inner array is one ascending linked list; the harness converts them to ListNode heads. ListNode is predefined.

Loading workspace…