Coding Interview Tutorial 146 - Sort List [LeetCode]

preview_player
Показать описание
Learn how to sort a linked list easily and efficiently using merge sort!

Algorithms, data structures, and coding interviews simplified!

This is an important programming interview problem, and we use the LeetCode platform to solve it.

Please support me at Patreon:
Рекомендации по теме
Комментарии
Автор

technically it's not O(1) space complexity because the recursion stack also take some space

mohitjoshi
Автор

I haven’t yet found a video on YouTube that does it in constant space. As soon as you use recursion, you are using the call stack. Call stack is dependent on the length of the linked list which does not make it constant space. Would be nice to see the bottom up approach being explained by someone.

djpraxpk
Автор

Thank you for all the videos. Especially those about mips programming. They helped me a lot!

pepsifles
Автор

thanks a lot .Best merge sort tutorial ever

chenchangyuan
Автор

finally i understood it after 2 hours of brainstorming, thanks to you

ankurgupta
Автор

Hi, Thanks for the video. I have one question. In this algorithm I see the list is divided only once. Should we not divide the list till we have single element and keep merging them back?

nukroividhe
Автор

Please make more videos on leetcode problems thank you for your time

srikanthracharla
Автор

Second reply. Thank you sir again. You are amazing

theboy
Автор

But i am disappointed with myself that i took 2 hours just to solve this problem, i want to know if i am the only one who took this much time or there are some more peoples

ankurgupta
visit shbcf.ru