Тёмный

Heaps and Heap Sort 

udiprod
Подписаться 137 тыс.
Просмотров 562 тыс.
50% 1

A demonstration of heaps, heap sort, and a competition with merge-sort.
See here www.udiprod.co... a more detailed discussion of the properties of heap sort.
Note that the procedures mentioned in the video, "sift-down", "heapify", and "sift-up", may be named differently in different descriptions of heapsort. The implementation is the same though.
Links:
---------
More details about this video: www.udiprod.co...
Previous matches:
Merge Sort vs Quick Sort: • Merge Sort vs Quick Sort
Quick Sort vs Bubble Sort: • Visualization of Quick...
Next match: • Insertion Sort vs Bubb...
Visit my homepage: www.udiprod.com

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 547   
@wizardsuth
@wizardsuth 3 года назад
The main advantages of heap sort are that it sorts elements in place and produces a valid partial result while the algorithm is still running. With most other algorithms you don't get any results until they're finished or nearly finished. For instance merge sort produces no results until the start of the final merge. Heap sort starts producing results right after heapify is done, albeit in reverse order. Another advantage is that heap sort doesn't require a lot of metadata. With merge sort you must keep track of all the lists to be merged, typically using a stack. With heap sort you just need a reference to the element being sifted up or down. The sift operations use tail recursion, which means they can be done iteratively. It's not really fair to compare heap and merge with only ten elements. Try it with about 10,000 and see how they compare.
@kienthanhle6230
@kienthanhle6230 2 года назад
There're an inaccuracy in your statement tho. If heap sort is producing results in reverse order, just use min heap.
@Bubu567
@Bubu567 2 года назад
"reverse order" In a order. Not 'reverse order'. The order it produces results in may or may not be the correct 'side' of the sort. It depends on if it's told to sort ascending or descending. Even then, it can invert your choice and then return the list backwards to you when you ask for it.
@Tasarran
@Tasarran 2 года назад
I find a heap most useful specifically in pathfinding. Don't actually sort it, just maintain the heap properties when all you really need to know is what is the biggest (or in some cases smallest) out of a collection, like when selecting which node to expand next. You don't care about how the rest of the list is sorted, as long as you van get the biggest one. You can get it in one operation, then run a sift-up one time, which will take something like square root of N operations...
@kienthanhle6230
@kienthanhle6230 2 года назад
@@Tasarran nah it's log n, which is way less than sqrt N
@GTD_GameTilDead
@GTD_GameTilDead Год назад
How are they gonna fit that many balls, let alone make time to sort them?
@jit_rs
@jit_rs 5 лет назад
It's fun how theese child-oriented videos actually explain heap implementation better than Wikipedia article. Keep up the good work!
@ilonachan
@ilonachan 4 года назад
Well, Wikipedia isn't supposed to explain stuff for better understanding, it's supposed to just provide the information for everyone. That's why these tutorial-like videos are so important.
@therino9695
@therino9695 4 года назад
Who said these were for children? These are for college students man!
@Lauren-ub6mj
@Lauren-ub6mj 4 года назад
@The Rino im a kid, and somehow I still understand it.
@corvidconsumer
@corvidconsumer 4 года назад
@@Lauren-ub6mj look at this genius guys
@unrelatedK
@unrelatedK 4 года назад
Jason Zhang this is already simplified enough for kids
@epsilonthedragon1249
@epsilonthedragon1249 7 лет назад
"Each ball is brighter than its children." Looks like those kids need some homeschooling.
@zeusrulez
@zeusrulez 6 лет назад
That One Random Gamer there’s a lot of corruption in the ball education system- money over mind, it’s a depressing world out there for modern balls
@mapelaanjakoodaansuomeksi3432
@mapelaanjakoodaansuomeksi3432 5 лет назад
@@zeusrulez Yeah, many balls have been popping themselves with needles. In Memoriam of Bright Maroon-Black.
@suwinkhamchaiwong8382
@suwinkhamchaiwong8382 5 лет назад
xD
@taureon_
@taureon_ 5 лет назад
@@zeusrulez this comment is too underapprechiated
@DNXTMaster
@DNXTMaster 4 года назад
I'm the one dumbass thinking this was an interracial relationships joke
@rosebuster
@rosebuster 7 лет назад
Heap Sort may not be ideal when sorting is all you want to do, but this whole idea of a heap becomes invaluable when you need a data structure that allows you to always take out the smallest element quickly, but also be able to quickly modify the data in the heap in between. And often in solving some more advanced problem this is exactly what you need to do it efficiently.
@cyndie26
@cyndie26 6 лет назад
Maks Rosebuster Heapsort only requires one array to be used, so it doesn't take up as much memory as mergesort. Even with an array of a million objects, heapsort only takes about a second to sort everything. (I know because I just had to write a heapsort algorithm for a university project and the I remember hearing that the professor wanted us to sort that large of an array in under 30 seconds.)
@elitezinc2758
@elitezinc2758 6 лет назад
You gave an explanation of priority queue with implementation, nice
@KnakuanaRka
@KnakuanaRka 4 года назад
Yeah, in that implementation, it’s often called a priority queue, because you can freely insert objects, and easily look at and remove the one with highest priority (imagine a hospital waiting room, where the people with worse injuries get taken in first).
@ohno-wi1vb
@ohno-wi1vb 4 года назад
K1naku5ana3R1ka very interesting
@cpufreak101
@cpufreak101 8 лет назад
you seriously need to get those robots a set of glasses, then again, it'd prevent them from taking over without them
@groszak1
@groszak1 6 лет назад
but then it won't be realistic, computers can't just analyze every item simultaneously
@nolanjshettle
@nolanjshettle 6 лет назад
groszak1 actually a fairly simple digital logic circuit can be made to sort/compare several (less than 10) objects at once. An entirely new set of sorting algorithms would need to be implemented to take advantage of this but I wouldn't be surprised if you could get an order of magnitude improvement in sorting speed over a lucky quicksort. The problem with doing this is that sorting isn't done very often. You may ask your computer to sort things occasionally but it's not happening 60 times a second, once for each frame/update in a video game for example so doesn't need a drastic speed up.
@FplusETVChannel
@FplusETVChannel 5 лет назад
groszak1 computers use mostly quick sort
@coolmanjack1995
@coolmanjack1995 5 лет назад
@@groszak1 I believe it was a joke
@NyscanRohid
@NyscanRohid 4 года назад
The robots with glasses sorting algorithm is called radix sort.
@codenamelambda
@codenamelambda 9 лет назад
I really like your videos about sorting. They are great visualized, and it is the first time for me understanding Heap Sort and Quick Sort XD
@udiprod
@udiprod 9 лет назад
CodenameLambda Great :) Thanks!
@codenamelambda
@codenamelambda 9 лет назад
udiprod Nothing to thank for, because I have to thank you ;) So: Thank you!
@jamesyeoman794
@jamesyeoman794 7 лет назад
As an A-Level Computer Science student, I agree CodenameLambda (HL3 confirmed?). It is a lot easier to understand an algorithm when you have a visualization of what it's doing.
@friendhaus1858
@friendhaus1858 4 года назад
"Now the tree is in an illegal state" Ok who's been planting trees in israel
@tsaed.9170
@tsaed.9170 4 года назад
😂😂 dafuck
@kornsuwin
@kornsuwin 4 года назад
this is great
@TheGeeMaster1337
@TheGeeMaster1337 4 года назад
Other trees
@Tuxfanturnip
@Tuxfanturnip 4 года назад
KKL
@lesleyzore987
@lesleyzore987 4 года назад
Now this is genius.
@aidanmaley9826
@aidanmaley9826 7 лет назад
It's 1AM I have school tomorrow I need to finish my homework but I'm looking at CGI robots demonstrating sorting algorithms
@papinkelman7695
@papinkelman7695 7 лет назад
Large Moose realy? cgi robots, not real ones?
@aidanmaley9826
@aidanmaley9826 7 лет назад
Pa Pinkelman Really* And I meant that the little CGI characters are representative of robots. So... CGI robots.
@papinkelman7695
@papinkelman7695 7 лет назад
I know what you meant... I rea ll y do.
@regen-Q
@regen-Q 5 лет назад
Plot twist: the homework IS about sorting algorithms
@KnakuanaRka
@KnakuanaRka 4 года назад
Hey, my homework is about heap sort, so what’s the problem?
@tehrackoon2021
@tehrackoon2021 7 лет назад
So are these little robots actually in my computer?
@GiornoGiovannaGangstar
@GiornoGiovannaGangstar 6 лет назад
yes it is my dude
@neoxus30
@neoxus30 6 лет назад
That's bullshit, but i believe it)
@mapelaanjakoodaansuomeksi3432
@mapelaanjakoodaansuomeksi3432 5 лет назад
@@cyllum8627 r/wooosh
@guidomarrone9562
@guidomarrone9562 5 лет назад
They are in your blood. They carry your oxygen.
@mapelaanjakoodaansuomeksi3432
@mapelaanjakoodaansuomeksi3432 5 лет назад
@@guidomarrone9562 **they sort your oxygen
@Heligoland360
@Heligoland360 8 лет назад
I would like to see a Radix sort video.
@pussinbootsisawesome
@pussinbootsisawesome 7 лет назад
Rohan Zener kinda like sorting quarters then sorting again and again until it is sorted. idk
@VivekGawande1
@VivekGawande1 7 лет назад
Rohan Zener Radix sort sorts the number by the following procedure: First it sorts the elements based on units place Next it sorts the elements based on tens place And so on...
@Snagabott
@Snagabott 7 лет назад
Radix rocks... but not on colored balls. Which I assume was the point.
@MrHatoi
@MrHatoi 7 лет назад
Radix only works on integers though, so it's not going to fit the colored ball example.
@gordn_ramsi
@gordn_ramsi 6 лет назад
You can just put numbers on the balls, can't you?
@HallidayASR
@HallidayASR 7 лет назад
Even before the match started I knew Heap sort would lose :( It seems like a bad sort
@TomBertalan
@TomBertalan 6 лет назад
Spoilers, man.
@trangium
@trangium 6 лет назад
It's better than bubble sort, though.
@setsunaes
@setsunaes 6 лет назад
It has its uses, like when speed is not that important but memory usage is a big concern.
@f5673-t1h
@f5673-t1h 5 лет назад
Heap sort is not bad; it's O(nlog(n)) just like Merge sort.
@AndreUrzua1
@AndreUrzua1 5 лет назад
I created both algorithms to test the time it takes for each to sort a vector, and actually heapSort was actually faster than MergeSort... like twice as fast. I think that making copys of the initial vector is a heavy task and makes HeapSort better or something I don't know, but numbers are really consistent
@tabularasa0606
@tabularasa0606 3 года назад
Heap sort is still my favorite, it's just a beautiful algorithm that works perfectly when you have to sort extremely large lists.
@bitonic589
@bitonic589 Год назад
Pigeonhole sort:
@gm_construct_13_betaexplor38
@@bitonic589pigeonhole is only good if every element is unique
@official-obama
@official-obama 8 месяцев назад
@@bitonic589 imagine sorting floats with that
@bitonic589
@bitonic589 8 месяцев назад
@@official-obama Treat the floats as integers
@bitonic589
@bitonic589 Месяц назад
​@@official-obamaCounting sort:
@TimForTheWin12
@TimForTheWin12 8 лет назад
It might be more efficient for someone to design better eyes for your robots :P
@noyz-anything
@noyz-anything 7 лет назад
this is not possible, as they are looking into the souls of the balls
@DEFCON1GAMRS
@DEFCON1GAMRS 6 лет назад
That’s right, skin may be darker but the soul is blacker. (Racism humor intended, no harm intended, im sure i wasnt the only one that thought this.)
@johnrose411
@johnrose411 6 лет назад
DEFCON1GAMRS yeah me too
@GiornoGiovannaGangstar
@GiornoGiovannaGangstar 6 лет назад
the good Boyes go at the front,the bad Boyes go to the back
@YaboiMuggy
@YaboiMuggy 6 лет назад
the "short sighted robot" is just an metaphor for the way the algorithms are programmed.
@leonardoantonio216
@leonardoantonio216 5 лет назад
I love how the Merge Bot had a face like "Can I leave now?" Or "Can I have my cookie now?"
@KristabelHilton
@KristabelHilton 3 года назад
I felt sorry for the Heap Sort robot still working hard while the Merge Sort robot was just standing there. I imagine merge sort robot tapping his foot impatiently!
@bwayagnes
@bwayagnes Месяц назад
@@KristabelHiltonwait till you see the stooge vs bogo video 🤣😭 poor dude stood there for half an hour
@Omlet221
@Omlet221 5 лет назад
I like the screens in front of their table. It makes it much easier to understand.
@masonhunter2748
@masonhunter2748 4 года назад
Bro that burger look like a noob subreddit icon
@Blazewoods
@Blazewoods 4 года назад
Different sorting compilations started showing up in my recommended, and I started watching them, confused on what they were, and now these have shown up. I’m not disappointed, just confused.
@simzhou
@simzhou 4 года назад
00:07 Intro to Heap/Heap Sort 02:37 Building the Heap in the first place (Heapify) 03:33 How is new elements added into a Heap 04:07 Heap Sort V.S Merge Sort Excellent Work! I felt like I haven't grown up yet! lol
@AndreaForlani
@AndreaForlani 2 года назад
Thank you, Yuyuko-sama
@beetlemush768
@beetlemush768 4 года назад
I have no idea what brought me here but this seems to be a good way to spend my quarantine
@dominiqueveilleux2802
@dominiqueveilleux2802 7 лет назад
I really would like to see more of those videos about sorting. I need to find a quick way to sort my books in alphabetical order.
@LucidMlem
@LucidMlem 2 года назад
Quick sort could be good Take a book from the middle, and put every book that comes before that before it, and every book that comes after that after it. Repeat it with your groups, until you have groups so small, they could be sorted with a different sort.
@dlwatib
@dlwatib 9 лет назад
Do smoothsort. It's along the same lines as heapsort, but does things kinda backwards so that it doesn't have to move any data if it's already sorted.
@LEOS_RETURN
@LEOS_RETURN 4 года назад
I thought h didn't exist
@SarenArterius
@SarenArterius 9 лет назад
My teacher is now playing this in the Data Structure lesson! :)
@feritperliare2890
@feritperliare2890 2 года назад
Kinda sad though cause this is actually kind of a poor example of heap sort considering usually it's faster than merge sort
@razerage1
@razerage1 7 лет назад
I don't know how these sorting algorithm videos could be useful to me someday..
@andreiiaz2097
@andreiiaz2097 3 года назад
Well, you understand how each sorting algoritm works and which one is better
@masonmunkey6136
@masonmunkey6136 3 года назад
If you ever get into programing
@Axacqk
@Axacqk 4 года назад
I just came from the halting problem video, amazed how great your physical world analogies are. The short-sighted robot that can only look closely at two balls at a time in order to compare them is another gem!
@entechcore
@entechcore 6 лет назад
*takes out brightest ball* GET DOWN ON THE GROUND
@lorenzvo5284
@lorenzvo5284 9 лет назад
I think the robot is cute
@wasbedeutet151
@wasbedeutet151 8 лет назад
+Deer Viehch definitely cute
@dzarthedemon4855
@dzarthedemon4855 4 года назад
Not gonna lie, this actually kinda fun to watch.
@52flyingbicycles
@52flyingbicycles 6 лет назад
heapify: one of my new favorite words
@jabre7761
@jabre7761 4 года назад
Do gravity sort That would be quite a show
@mcvibing2785
@mcvibing2785 3 года назад
"SORT SESAME" And then they change color
@niemiec2601
@niemiec2601 4 года назад
Thanks! I Realy Struggled with Heap Sort. So This Helps ALOT.
@duman.naz.a
@duman.naz.a 4 года назад
I dont learn these in school, my main language isnt even English. But these, oh boi these are hella worth the watch
@ForTheOmnissiah
@ForTheOmnissiah 2 года назад
I think it would be more fair to also show a heapsort vs mergesort when the heapsort already has a heap structure. Both of these algorithms have O(n log n) time complexity, assuming the heapsort is executing on an already existing heap. Heaps have the advantage that extracting the min (or max for a maxheap) element is a consistent O(log n) time complexity, which is fantastic speed. This has a very high amount of use cases.
@cheofusi3562
@cheofusi3562 4 года назад
For a moment I lost respect for heapsort..
@sonxuannguyen1207
@sonxuannguyen1207 4 года назад
I think u should put numbers that represent the brightness on the ball, because numbers will help very much in illustrating as well as understanding the algorithms
@bitrunner8759
@bitrunner8759 3 года назад
i love seeing the winner robot just sit there waiting like *can i go home now*
@Jonathanloov
@Jonathanloov 9 лет назад
YES YOUR NOT DEAD!!! I KNEW IT!
@FloodlightGamingReal
@FloodlightGamingReal 2 года назад
I remember watching visual versions of these (the ones that make sound that sounds like if edm music made an incest baby with a 4 year old 'composing' music) and being so confused about what was going on, and your videos make things so much easier to understand. Thank you for making these, keep up the good work!
@TeamNolex
@TeamNolex Год назад
*The time complexities are* Best: O(nlogn) Average: O(nlogn) Worst: O(nlogn) Storage: O(1)
@patsikabelo2640
@patsikabelo2640 9 лет назад
that's racist
@amaurimedici8030
@amaurimedici8030 8 лет назад
+patsi kabelo Hahahaha!
@wasbedeutet151
@wasbedeutet151 8 лет назад
+patsi kabelo wtf xD
@a.human.
@a.human. 2 года назад
One of the best, visually well explained educational videos my eyes have ever watched.
@TwoAwesomePeopleTAP
@TwoAwesomePeopleTAP 2 года назад
…is it weird I wish I had the money to commission this channel to animate explanations of more and more sorts in this style? The graphics remind me of the old Kutoka Interactive edutainment games I used to play as a kid, like Mia Mouse. It feels like I’m hear to learn without judgement, and yet with little bits of humor thrown in. Not to mention all the sounds are soothing.
@michaelwolfe7970
@michaelwolfe7970 Год назад
this video makes the concept of heapsort so obvious. honestly, i don't know why I was even wasting my time trying to decipher that thick, confusing textbook anymore.
@reissner1967
@reissner1967 5 лет назад
I like that you made the ROBOT EYES MOVE, look at each ball when they are brought to the robot’s face. :) I noticed that. :)
@cameodamaneo
@cameodamaneo 7 лет назад
I found some demonstrations regarding an algorithm called "gravity sort" but I can't seem to find any video that gives an explanation. Would you be able to point me in the direction of some resources that could explain it?
@earlanofficial1
@earlanofficial1 4 года назад
The mother The children The children's children The children's children's children
@johncochran8497
@johncochran8497 6 лет назад
One major advantage to heapsort that's not addressed here. If you have more elements to sort than will fit into memory, you need to resort to an external merge sort. And the number of passes that the merge sort requires is dependent upon the number of runs (sorted sequences) that are already created. Assuming you can store N items in memory, the technique is to read in N items, sort them, then write out that run and repeat until you've created the initial set of runs. So each run is N items long. However, in heapsort, you read in N items, write out the lowest item and then read in the next item. If it's greater than the item just written, place the newly read item into the heap and continue. If it's less than the item just written, reduce the heap by 1 element and save the newly read item into storage. Result is that on average, using heapsort, the initial length of each run is 2N, not N. So you have about half as many runs to process with mergesort. So it runs faster.
@wendyhau7644
@wendyhau7644 8 лет назад
Love these videos! Would be great if you could do some more. So much help. Thank you!!
@prysthaea7735
@prysthaea7735 2 года назад
This series is a gem
@mr.sandman3619
@mr.sandman3619 3 года назад
0:39 "now the tree is in an illegal state" FBI OPEN UP!
@homqua9613
@homqua9613 4 месяца назад
The explain is so brief and clear, thanks so much.
@thatoneflaregun3167
@thatoneflaregun3167 3 месяца назад
Why am I watching adorable robots sort bowling balls by shade
@kishw0nky
@kishw0nky 9 лет назад
great video, i enjoy the robot animations, esp the battle at the end to help actualize sorting algorithms. Helps some of us visual-programmers understand what's going on. I get sick of algorithms easily, this helps :)
@Pyramid132420
@Pyramid132420 8 лет назад
Will you be doing all of the common basic/advanced sorts?
@udiprod
@udiprod 8 лет назад
+Pyramid132420 I plan to do more of them, among other things.
@udiprod
@udiprod 8 лет назад
The next video will be about physics again, and will be published quite soon hopefully. I promise to do another sorting video afterwards. Thanks for the suggestion. May I ask why you are particularly interested in bogosort?
@maxikiosco8192
@maxikiosco8192 6 лет назад
udiprod I'm actually really interested in the efficiency of bogosort vs bozosort
@RufusShinraPower
@RufusShinraPower 2 года назад
Interesting. You don't even need a linked list or a tree to perform this sort.
@Kram1032
@Kram1032 9 лет назад
always nice to see one of these
@AwesomeMinecraftersakuraodomMC
Can you do a video on gravity/bread sort? I don't understand it at all and I love your visualizations.
@want-diversecontent3887
@want-diversecontent3887 6 лет назад
sakurawolfie It just gravitates units, it can't be visualised here.
@halfnwhole751
@halfnwhole751 6 лет назад
Gravity Sort just makes the darker ball heavier and vice versa and then pushes them to fall of the shelf And bread sort just sorts bread not balls
@windowsxseven
@windowsxseven 2 года назад
Maybe it's for the better that you don't put your dirty little hands on gravity sort. Clearly if you need a video to understand it, it's not meant for you. Stick to bubble sort, peon.
@bullseyecg3501
@bullseyecg3501 4 года назад
i dont understand why anyone would need this information but its cool and i like it
@martinjohnsons4523
@martinjohnsons4523 4 года назад
can I rest now? says the yellow bot while staring...
@progamerzzz1237
@progamerzzz1237 3 года назад
Why did u stopped making videos. They are so good
@dvoid4968
@dvoid4968 2 года назад
when i first saw this sort i thought it was a variation of the selection sort. turns out it isnt
@chewyankles5783
@chewyankles5783 5 лет назад
When the person says “execute” I think of order 66 from Star Wars
@samplower5860
@samplower5860 4 года назад
It executing.
@Luigion7
@Luigion7 2 года назад
0:42 "Now the tree is *_in an illegal state."_* -had me rolling-
@vhanzesp
@vhanzesp 3 месяца назад
I feel bad for the elements with no children
@yahoo5726
@yahoo5726 Год назад
I like how they all have different tables
@yash1152
@yash1152 Год назад
this ia actually useful. thanks for it.
@germancat429
@germancat429 Год назад
It’s 1 am what am I doing
@asianweebtrash9298
@asianweebtrash9298 5 лет назад
Heap Sort: You may (kinda) beat Quick Sort, but I will do even better then you, Merge Sort! Merge Sort: Let's see about that! When Merge Sort finished before Heap Sort... Merge Sort: What's taking so long, Heap Sort!!! Heap Sort: I don't know... Merge Sort: Ugh, whatever, Heap Sort.
@CARLOSINTERSIOASOCIA
@CARLOSINTERSIOASOCIA 9 лет назад
love your videos, please keep doing them :)
@udiprod
@udiprod 9 лет назад
Thanks!
@popop72276
@popop72276 3 года назад
quick >= merge > heap >> bubble
@Geoxor
@Geoxor 9 лет назад
4:14 im just curious if you guys make the animation faster so it does it faster, is that the case?, it doesnt look like it is faster though...
@udiprod
@udiprod 9 лет назад
Which animation seem faster to you? They're all the same. If you ask about merge sort vs heap sort then you can check the comparisons count. They advance at a similar rate.
@Geoxor
@Geoxor 9 лет назад
udiprod The yellow one, thanks for the answear
@XaxtonRevolution2
@XaxtonRevolution2 2 года назад
Could you please specify the decision tree which is being used in heapify? I can't figure out from how the order of which ball to look at next is being determined. And when you say the lowest ball do you mean the one at the bottom or the darkest one?
@IAMHAPPY5290
@IAMHAPPY5290 2 года назад
Very interesting video. I cant seem to wrap my head around the heap sorting thing but hey it was fun to try
@nadie-qm8rq
@nadie-qm8rq 2 года назад
I love these videos, but I wish youtube had recommended them to me two years ago when I was taking structure and algorithms class.... but is good to remember now, since I forgot it all
@zamir3773
@zamir3773 Год назад
Merge sort is merging pieces
@jamesfunk7614
@jamesfunk7614 5 лет назад
The "click here" parts in the video didn't work for me. The only thing that happened was it paused and restarted the video. Can you put links to the other videos in the description?
@udiprod
@udiprod 5 лет назад
Done.
@jamesfunk7614
@jamesfunk7614 5 лет назад
@@udiprod Thanks!
@egggarnishaustin5559
@egggarnishaustin5559 4 года назад
Oh my God that's fucking genius I realize this at like a minute and a half it just blew my mind although it could be because I'm really tired right now
@HalfEye79
@HalfEye79 8 лет назад
I would like to see a comparison between Bubble Sort and Gnome Sort. BTW: When I programm something to use gnome sort, I add a variable, at which number the algorithm was, when it starts to compare to the start. Then, when it's ready, it can go just to this index and don't compare up to the turning point.
@Dragoneer
@Dragoneer 4 года назад
So if making a heap already organizes the list somewhat, then what’s the point in the heap? Seems rather inefficient compared to other algorithms...
@cts3696
@cts3696 2 года назад
“each ball is brighter than it’s children” if you think about it it’s true in real life senses
@corvax8644
@corvax8644 7 лет назад
Heap vs bubble
@florianmayr39
@florianmayr39 4 года назад
Through this video I understood the concept of heap sort. (I am a informatics student)
@gawys28
@gawys28 4 года назад
He did his best
@flaviasantos2854
@flaviasantos2854 Месяц назад
1:01 We'll gradually move the top element downwards until it sinks down to where it belongs
@vclarke4433
@vclarke4433 7 лет назад
"Gradually move the top element (black ball) downwards, until it sinks down to where it belongs.." What kind of racist bullshit sorting algorithm is this?
@madmanmortonyt4890
@madmanmortonyt4890 2 года назад
I love how these algorithims are personified as being "near-sighted". These machines aren't stupid. They don't have vision like you or me.
@AUSTINwazhere
@AUSTINwazhere 7 лет назад
I feel like a chess club kid at a football practice... But the other way around... Muh Brain don't math good.
@ЕленаПоддубная-с6ш
Do quick sort vs heap sort!
@ЕленаПоддубная-с6ш
I just wanna see who'll win
@kh6853
@kh6853 Год назад
Heap sort just has OCD and wants to make sure everything's organized while it organizes things
@PheloSaad
@PheloSaad 4 года назад
Can you do Selection Sort? :)
@SevenDeMagnus
@SevenDeMagnus 4 года назад
Cool
@groszak1
@groszak1 6 лет назад
Welcome to heaps, where no one gets married.
@syrhtea
@syrhtea 3 года назад
Life must be depressing for the near sighted robots. they have to put things inches away from their faces to see, and it takes them a while to comprehend whats infront of them, too. you shouldgive those robots some glasses, and maybe an interpereter, too. then they could compete much faster, and maybe the battles will be more interesting, too!
@smaybius
@smaybius 3 года назад
What if heapsort got a headstart by letting it heapify first?
@dtstar331
@dtstar331 2 года назад
The comparison between Heap Sort and Merge Sort isn't fair in my opinion. Merge Sort might be considered faster but at the expense of a significant increase of memory required
@JR_CAM
@JR_CAM 5 лет назад
For visualizing heap maybe big/small-sized balls will do better than color - the bigger gets the lower
@maglev957
@maglev957 3 года назад
I need to see a tournament of every sorting algorithm in this style
@XaxtonRevolution2
@XaxtonRevolution2 2 года назад
Can we get an animation that uses numbers instead of colors?
@atprra
@atprra 5 лет назад
I love all of your videos. They are the best! Keep up the good work
@ProfessionalEngg
@ProfessionalEngg 7 лет назад
I can see the effort in making this video. Appreciate it. Thanks.
@MrRudale
@MrRudale 5 лет назад
If the first step of the algo is to 'just pick the darkest ball', why can't it just do that and then pick the darkest ball of what is left... etc.
Далее
In-Place LSD Radix Sort
13:11
Просмотров 130 тыс.
Insertion Sort vs Bubble Sort + Some analysis
5:17
Просмотров 323 тыс.
Airpod Through Glass Trick! 😱 #shorts
00:19
Просмотров 865 тыс.
Visualization of Radix sort
7:02
Просмотров 58 тыс.
Heaps in 6 minutes - Methods
5:56
Просмотров 75 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 716 тыс.
[Laser] Firing squad synchronization problem
8:47
Sorts - Sphere Agitation
7:47
Просмотров 614 тыс.
15 Sorting Algorithms in 6 Minutes
5:50
Просмотров 24 млн