diff --git a/content/notes/heapsort.md b/content/notes/heapsort.md index 167464d5d..960a92663 100644 --- a/content/notes/heapsort.md +++ b/content/notes/heapsort.md @@ -9,6 +9,9 @@ tags: # 3 Heap Sort In place and ϴ(n lg n) +![works in place](https://i.imgur.com/EbqSl4Y.png) + + - start with array - using itself as a heap, add the elements one at a time until all been added - Then remove them one at a time - the largest elements gets removed first and the place where is needs to be put gets freed from the map