Add another option for c heapsort, minor refactors, update docs

This commit is contained in:
2025-10-08 00:08:46 -05:00
parent 3fcd09e7c0
commit 6d84849ce8
5 changed files with 70 additions and 28 deletions

View File

@@ -1,6 +1,5 @@
#include "heap.h"
// TODO: remove the extra checks for heap_size if i don't need them based on calling
static int parent(int i) {
return (i > 0) ? (i - 1) / 2 : -1;
}