Heap sort visualization | What is heap sort and How does it work??

preview_player
Показать описание
Hi, in this animation tried to explain Heap Sort Algorithm. If you like the animation press the like button, press the subscribe button and Keep Learning.
Рекомендации по теме
Комментарии
Автор

Came for the heap sort stayed for the overly hyped music

KP-fybf
Автор

After the alleged "heapify" procedure, you still did not get a max-heap. 1:30 you have 2 as a parent of 4 and 8 which are bigger, so the heapification is wrong. And, heap-sort algorithm does not reheapify each time, it only does it once in the beginning; after that, the repeated operations is just extracting the maximum which keeps the heap structure and removes the maximum and puts it at the end (not considering it a part of the heap anymore).

aouerfelli
Автор

This visualization made me instantly understand how it works. Thank you!

sywesk
Автор

came for the algorithm visualisation, stayed for the bongos

kallychicken
Автор

ngl, this was mesmerizing. Is it safe to say that the comparison process (i.e. asking a node "hey, are you bigger or smaller than your parent node?" begins from the lowest, right-most position and pushes left?

jasonwang-wgwu
Автор

I wish I could know how these visuals are made!! What apps or tools can be used ?

shazaalyyy
Автор

Is this correct??? The heapsort algorithm specifies that heapify is only done once in the beginning. Then repeat this step: swap first and end elements and do siftDown

The PO's explanation does heapify every step of the way. The time complexity is O(n^2)

OneSanddman
Автор

If you did this with manim, could you share the code because I would also like to learn. Please

leandromarcelo
Автор

Thank you thank you thank you so much 😊..Last 30 min
of my examination 😢

diptimayeebiswal
Автор

It is helpful but it is not correct. It is not a max heap after you heapify it, you should swap 8 with 2

QuanDo-tubb
Автор

1:18 after switching 9 vs 2 thought we would heapify node 2?

lemao
Автор

why not just find max in array and move to top?

sergey
Автор

warning for anyone watching this, this video is wrong btw.

this video is not demonstrating heapsort.
what it is actually demonstrating is basically just selection sort but worse.
its iterating through the entire unsorted part every iteration and pick out the largest index.

b
Автор

you did wrong pattern in 1.30 will be parent node for 2, 4

imrulemon
Автор

good visualization, but i think the process is wrong

memeingthroughenglish
Автор

Holy shit why does heap sort sound evil

VonSteiner
Автор

錯了 heapsort 必須要nlgn時間複雜度
你這個是n^2
我們這裡已經有兩個同學誤用你的影片來教學了

hkpzofk