everything is fun and games until you have to actual code this
Came for the merge sort, stayed for the beat.
dang it, boys. Atleast gimme some time to pause and read the code.
This might be a minor thing, but you might want to change your font for videos like this - I kept reading "|s| < r" instead of "is l < r" initially, which was very confusing.
This video alone helped me code the whole thing alone. Magnificent work ❤
dude, you're brilliant. About a minute in and I immediately understood the essence of merge sort, as compared to watching some other videos where they ramble on for 15 minutes...
The video is very helpful and to the point 👍
The funny thing about this code is that the merge is indicated for large vectors where mergeSort works more efficiently, the problem is that it uses recursive functions that spend a lot of memory.
0:35 Only after completely getting individual elements in the left part oft the array it goes to divide the right part(i.e 9 8 210) as the recursive calls completely divide the left part and then goes to the right part of the array?But here it is shown as it is done together(Correct me if i am wrong) Shouldn't it be like this? Splitting [54, 26, 93, 17, 77, 31, 44, 55, 20] Splitting [54, 26, 93, 17] Splitting [54, 26] Splitting [54] Merging [54] Splitting [26] Merging [26] Merging [26, 54] Splitting [93, 17] Splitting [93] Merging [93] Splitting [17] Merging [17] Merging [17, 93] Merging [17, 26, 54, 93] Splitting [77, 31, 44, 55, 20] Splitting [77, 31] Splitting [77] Merging [77] Splitting [31] Merging [31] Merging [31, 77] Splitting [44, 55, 20] Splitting [44] Merging [44] Splitting [55, 20] Splitting [55] Merging [55] Splitting [20] Merging [20] Merging [20, 55] Merging [20, 44, 55] Merging [20, 31, 44, 55, 77] Merging [17, 20, 26, 31, 44, 54, 55, 77, 93] [17, 20, 26, 31, 44, 54, 55, 77, 93]
okay this beat kinda slaps
Be aware: the seqence how the array gets divided is not drawn correctly! First the left branch gets entirely divided, and only after that the right branch gets divided. Checkout 0:25 and think the right branch will start after the complete left has been finished.
where I usually watch youtube videos on a fast speed, I had to watch this one at a slower speed XD. BTW it was helpful to understand the essence of merge sort but code should've been explained but you guys do A WHOLE LOT of work so it's still okay, we got it, thanks a ton
Quick revision before every exam, every semester. Thanks.
These are amazing and SO easy to understand.
Woww u saved my 15 minutes of time Rather watching all those videos of 15 minutes This 1minute video teached me a lot
More than a second to read several sentences would be appreciated...
Please make the pace of videos understandable...and have some explanation on complexity as well
The background music was awesome.
I'm really confused about one thing in particular. Not the algorithm, but the code. When merging with (while (i < n1 && j < n2), shouldn't it be "||" instead of "&&"? It feels, to me as a newbie, that if one side is all bigger or smaller than the other, after (i) or (j) reaches becomes false in the expression, it jumps out of the while loop, leaving the other half hanging. Where am I wrong? What I'm missing? edit: I saw again and saw that there is another while loop to catch my point. But why use as-is instead of changing the logical boolean operator?
@GeeksforGeeksVideos