Salesforce SDE Interview Question (2021) | Priority Queues & Advanced Linked Lists
Salesforce · Question · Posted Jun 2026
Question 1: Merge K Sorted Lists Problem Statement You are given an array of K linked-lists, where each linked-list is already strictly sorted in ascending order. Merge all the linked-lists into one single completely sorted linked-list and return it. Input Format An array of K ListNode heads representing the K different sorted linked lists. Constraints K == lists.length 0 <= k <= 10^4 0 <= lists[i].length <= 500 -10^4 <= lists[i][j] <= 10^4 The sum of all nodes lengths will ...
The full answer & interview discussion are available to premium members.
Log in Create a free account