Merge K Sorted Lists

Merge k sorted linked lists and return it as one sorted list.

Example :

1 -> 10 -> 20
4 -> 11 -> 13
3 -> 8 -> 9

will result in

1 -> 3 -> 4 -> 8 -> 9 -> 10 -> 11 -> 13 -> 20
Interview Code Editor
Hints
  • Solution Approach
  • Complete Solution
4229 successful submissions.
Asked In:
  • Flipkart
  • Amazon
  • Google
Click here to jump start your coding interview preparation