Something is still not clear to me: in the "merge tournament", every time you pop an element and a leaf spot is available, how do you choose which list you get the next item from?
You would look at the next element from each list that is eligible to be put into the leaf spot, compare them, and add the lowest value. This would prevent a scenario where the same sequence of elements getting added and blocked off occurs.
Great video on Heaps and Heapsorting. Easy to understand and very detailed. Thank you for taking the time to make it and post it. Can you also do a video on the java and python code version of this too please. Thank you
+Mirko Cukich thanks. I already have a video on Python MaxHeap implementation. I plan to do more videos on heaps and sorting implementation when I get time. If you subscribe to my channel you'll know when I post new videos.
+Joe James Cool, yep im already a subscriber i love your other videos too. I haven't seen all of them yet but I will def. check out the Python MaxHeap impl. I look forward to seeing the rest of your videos and your new ones coming up too. Thank you again.
when that happens you just start a new output list. every time you start a new output list all the numbers in the heap can compete again. you may end up with many output lists, and they'll all be in sorted order.
Very helpful visualisation and explanation. Thank you
Something is still not clear to me: in the "merge tournament", every time you pop an element and a leaf spot is available, how do you choose which list you get the next item from?
You would look at the next element from each list that is eligible to be put into the leaf spot, compare them, and add the lowest value.
This would prevent a scenario where the same sequence of elements getting added and blocked off occurs.
Great video on Heaps and Heapsorting. Easy to understand and very detailed.
Thank you for taking the time to make it and post it.
Can you also do a video on the java and python code version of this too please.
Thank you
+Mirko Cukich thanks. I already have a video on Python MaxHeap implementation. I plan to do more videos on heaps and sorting implementation when I get time. If you subscribe to my channel you'll know when I post new videos.
+Joe James Cool, yep im already a subscriber i love your other videos too. I haven't seen all of them yet but I will def. check out the Python MaxHeap impl.
I look forward to seeing the rest of your videos and your new ones coming up too. Thank you again.
6:02 that's the doubt.
Can there be like too many black numbers? Just so you wont be able to insert in the tree more?
when that happens you just start a new output list. every time you start a new output list all the numbers in the heap can compete again. you may end up with many output lists, and they'll all be in sorted order.
Thanks!
I need a code for this tournament sort. if any of one has a code of this sort kindly share it with me.
that is the runtime complexity of this algorithm?
O nlogn
It saved me a lot, thanks !!!
Excusme do you have a program about It? Thanks a lot
No, I didn’t code this one
very helpful sir
Thanks and welcome
uh made it really easy thank you...
Realy helpful..!
sir plz send algorithm for tournament sort
thx man