소스 검색

qsort: add a short comment about the algorithm

Leah Neukirchen 7 년 전
부모
커밋
52cf5c18f4
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/stdlib/qsort.c

+ 3 - 0
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 <stdint.h>
 #include <stdlib.h>
 #include <string.h>