Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Merge K Sorted Lists

Difficulty: Medium

Acceptance: 70.00%

Points: 30.00

You are given an array of k singly linked lists, where each linked list is sorted in non-decreasing order. Your task is to merge all the linked lists into one sorted linked list and return its head.

Topics

Companies

Articles

Examples:

N/A

Constraints:
  • 0 = k = 104
  • 0 = Total number of nodes = 105
  • -10? = Node.data = 10?
Companies:
Visa
Topics:
Linked List
Locked Content
Access Restricted: Please Login to access the code editor and test cases.