LeetCode 23. Merge k Sorted Lists[ Algorithm + Code Explained]

preview_player
Показать описание
One of the most frequently asked coding interview questions on Linked List in companies like Google, Facebook, Amazon, LinkedIn, Microsoft, Uber, Apple, Adobe etc.

LeetCode : Merge k Sorted Lists


Question :Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

Example:

Input:
[
1-4-5,
1-3-4,
2-6
]
Output: 1-1-2-3-4-4-5-6

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

Hello Jayanti, one suggestion is before directly solving problems, you can use your notepad to discuss your approach . Here notepad means anything from ipad or any tablet which enables you to write or take notes. Using that you can discuss your approach and then solve the problem.

biranchinarayanpadhi
Автор

Hi Ma'am. how can i get cheat sheet of approaches to solve LL problems. you have that of other data structures too?

jiteshkumar
Автор

@jayati can you post solving method ppt, this was very helpful.

vinayakbansal
Автор

I appreciate a lot for your lecture! However, I have something do not understand. What's the meaning of the "lists[index1]=ans.next"?

danqingreader
Автор

Mam I am getting time limit exceeded for the same code.

surajgrandhi
Автор

Could you please make solutions in cpp... Mam

venkatabhavanbharadwaj
Автор

Thanks for your effort in making the video !! But most of the guys use editorial for understanding the concept not solution. So, please if u can first explain the concept on a white board will be more better.

ShreyaSingh-vrqi
Автор

Entry sound of your video is so annoying!

sumanthsaadam
welcome to shbcf.ru