Amazon interview question Merge K sorted list | leetcode 23 | python solution

preview_player
Показать описание
Please like the video, this really motivates us to make more such videos and helps us to grow. thecodingworld is a community which is formed to help fellow student and professionals looking to crack the “coding interviews”.

We love solving and sharing problems which are frequently asked in technical interviews and voted by community at various websites.

✅ For more and upcoming updates join our community

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

Good approach.Another thought iterate through the list, dump each element in a minheap.Create a list from minheap.Would give merge sorted result list.

arnabganguly
Автор

Clear explanation but it would really help you additionally talked about time and space complexity and why one is better than the other :)

Jess-xxul
Автор

Very good explanation. Thank you very much Sir for simplifying it. Excellent video.

shashikantdivekar
Автор

In merge(self, l1, l2) you should return dummy.next

aarzibhagya
Автор

It's quite easy... What u need to do, is to merge list not merge sort of array. This is not a correct approach.

amazingtrip
visit shbcf.ru