Merge k Sorted Lists - LeetCode (Solution & Explanation | JavaScript)

preview_player
Показать описание

Merge k sorted linked lists and return it as one sorted list.

Topic(s): Linked List, Queue

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

This is helpful! I'm preparing for a FAANG interview and it's not easy to find JavaScript walkthroughs to these problems. Your clear explanation made this click for me. Thank you!!!

khasmaktruth
Автор

So hard to find javascript solutions let alone good solutions!
Your explanations are clear and straight forward. Thank you for sharing :)

RishModi
Автор

Do you realize that God is going to bless you specifically????... What the f!!! Your explanation and thought process is so wonderful! Want to see more contents from you!

therustguy
Автор

This solution was sweet like your name, thanks for the great explanation!

TheBehindScene
Автор

This made sense especially with the way you moved the linked lists around after shifting. The assignment for the dummy and current still baffles me. Comment from James is exactly what confuses me

silentkillz
Автор

Would be good to have time and space complexity explained.

manulscode
Автор

Ok, maybe I'm missing something with how variables are assigned in JavaScript. How the heck does "dummy" come into play? I don't understand the relationship between "dummy" and "current" - How does "dummy" get filled with the sorted lists?

jamesw