Merge Sort In Python Explained (With Example And Code)

preview_player
Показать описание
Merge Sort is an efficient sorting algorithm with O(nlogn) running time. In this video I show you a quick example and how to implement this algotrithm in Python step by step.

This video is part of the basic algorithms in Python playlist. The goal is to get an understanding of basic computer science algorithms and their implementation in Python.

For more coding videos subscribe to my youtube channel.
Рекомендации по теме
Комментарии
Автор

Probably the best videos I have seen on these basic algorithms on YouTube. Keep up the awesome work! have learned so much from your videos!

Eduardo_C
Автор

Probably the best merge sort video on youtube....
Lot of people just confuse on this topic due to lack of clarity... even the experieenced ones

t-distributedkid
Автор

Wonderful explanation, I really like how you describe WHY you are doing things at each step.

Many people create tutorial videos where they simply say "okay and now we do this to get it to compare how we want to" and don't say why they do it that way.

sucraloss
Автор

Clear, concise, thorough and simple algorithm. Finally understood this, thank you for your great explanation!

analll
Автор

Much better than the million videos out there just talking rubbish

zakariaryanmechkak
Автор

Been on YT for too long looking for exactly this, a simple implementation. Brilliant.

EagerEggplant
Автор

read a comment that this is the best video on youtube for merge sort and i would like to say indeed it is the best

tusharnaagar
Автор

Hats off to you for explaining everything step by step, even the basic things like colon, every index. I'm a beginner with 3 weeks into python and i started my second course on FreeCodeCamp that's an interactive one with a lot harder projects than i ever done. This is my second recursion project, their variable naming was way too long and i was being overwhelmed with very long variable names. My code from project looks identical to yours and yet yours is so concise and easy to read. Recursion is still something that i'm struggling with, but i feel like this video got me closer to understanding it. Thank you!

Kamil-rfqn
Автор

thank you so much, You saved me, I tried to implement merge sort with C, but most of C tutorials make it complicated

mohammedhrima
Автор

explanied so nicely ...understood after watching this vedio only.. mission accomplished!!

shwetarajapure
Автор

Thank you! This was a great in-place solution. I would love to see you walk through a non-in-place solution.

rhodabaruch
Автор

Great explanation. Remember to add the base case when len(arr) <= 1 to return nums if you are returning the list.

qsgrtls
Автор

Its my first algorithm in my life and I am finally able to code it.
Thank you for your help.

RootUser-lgqh
Автор

This is an awesome video!
I am doing the algorithms module on Khan Academy. I understood what i was suppose to do fairly easily. Khan Academy's challenge is in JS but was not understandable.
I skipped through to the code example part and you explained this perfectly. I understood exactly why you were doing each line of code instantly.
Putting this into practice may be a little harder but now i have a code example which is thoroughly commented in my own words to help me solve future problems using merge sort

THANK YOU

waaaaaaaayyyyyynnnee
Автор

Very well explained. My algorithms class was terrible lol.

ManuelGozzi
Автор

This is really simple and elegant. I wish I found this video before battling with merge sort - Thanks

ozzy
Автор

Best videos should reach more people. YouTube should show this kind of videos in recommendations.
Highly recommended. Superb Explanation.

aj_hari_
Автор

You explained this in such an easy way compared to my uni professor lol. I couldn't thank you enough for these vids!

julian
Автор

Fantastic! Thank you so much for the detailed explanation!

VladislavRashkov-ew
Автор

thank you so much this is what I call an explanation going straight forward to the point with all the important details this is a worth millions views

moussadiakhate