[Java] Leetcode 23. Merge k Sorted Lists [LinkedList #7]

preview_player
Показать описание
In this video, I'm going to show you how to solve Leetcode 23. Merge k Sorted Lists which is related to LinkedList.

Here’s a quick rundown of what you’re about to learn:
⭐️ Contents ⭐️
⌨️ (0:00) Question Explanation
⌨️ (1:02) Solution
⌨️ (5:28) Code

In the end, you’ll have a really good understanding on how to solve Leetcode 23. Merge k Sorted Lists and questions that are similar to this LinkedList.

Now, if you want to get good at LinkedList, please checkout my LinkedList playlist.

Рекомендации по теме
Комментарии
Автор

What is the changed time complexity after using min heap?

divyshikha
Автор

Hi Eric...quick question for you -

can you explain how this line works new PriorityQueue<>((a, b)->a.val-b.val)) for the following lists

L1=[2, 6, 8], L2=[3, 6, 7], L3=[1, 3, 4]

I know minheap will contain elements 1, 2, 3 from the 3 lists

babayaga
visit shbcf.ru