From 52cf5c18f4ad3a7a59fb7113cf115c6fc05c7494 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 10 Aug 2017 15:35:13 +0200 Subject: qsort: add a short comment about the algorithm --- src/stdlib/qsort.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stdlib/qsort.c') diff --git a/src/stdlib/qsort.c b/src/stdlib/qsort.c index 434d9350..da58fd31 100644 --- a/src/stdlib/qsort.c +++ b/src/stdlib/qsort.c @@ -21,6 +21,9 @@ /* Minor changes by Rich Felker for integration in musl, 2011-04-27. */ +/* Smoothsort, an adaptive variant of Heapsort. Memory usage: O(1). + Run time: Worst case O(n log n), close to O(n) in the mostly-sorted case. */ + #include #include #include -- cgit v1.2.1