From fd0570cc56d1d1d233ec60c5e9c47459f63b1789 Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Sat, 11 Jun 2022 13:22:25 +1200 Subject: [PATCH] vault backup: 2022-06-11 13:22:25 --- content/notes/heapsort.md | 3 +++ 1 file changed, 3 insertions(+) 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