Lyft SDE Interview Question 2025 February | Priority Queues | On-campus

Question · Posted Jun 2026

Question 1: Merge k Sorted Lists Problem Statement You are given an array of k linked-lists lists, where each linked-list is strictly sorted in ascending order. Merge all the linked-lists into one single, massive sorted linked-list and return it. Constraints k == lists.length 0 <= k <= 104 0 <= lists[i].length <= 500 -104 <= lists[i][j] <= 104 lists[i] is sorted in ascending order. Example Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Explanation: The linked-lists are merged sequentially into a single ...

The full answer & interview discussion are available to premium members.

Log in Create a free account