From b9fa91baa111d271dc489ccc0abfabf4224ed460 Mon Sep 17 00:00:00 2001 From: Joshua Cao Date: Sat, 30 Dec 2023 01:11:13 -0800 Subject: [PATCH] fix: document heap sorts space complexity to O(1) --- sorts/heap_sort.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/heap_sort.ts b/sorts/heap_sort.ts index ecc42995..e5541a77 100644 --- a/sorts/heap_sort.ts +++ b/sorts/heap_sort.ts @@ -4,7 +4,7 @@ * @see [Heap Sort](https://www.geeksforgeeks.org/heap-sort/) * @example MergeSort([7, 3, 5, 1, 4, 2]) = [1, 2, 3, 4, 5, 7] * @Complexity_Analysis - * Space complexity - O(n) + * Space complexity - O(1) * Time complexity * Best case - O(nlogn) * Worst case - O(nlogn)