Coding

Merge K Sorted Linked Lists

Merge K sorted linked lists.

Input: lists = [[2,2,3],[1,5]]

Output: [1,2,2,3,5]

Explanation: Extracts the smallest current node iteratively using a priority queue to build a single merged and sorted linked list.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

Interview question asked to Software Engineers interviewing at Akamai, Personio, Ceridian and other companies. Original question asked: Merge K Sorted Linked Lists.