summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/qsort.3
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2004-07-02 23:52:20 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2004-07-02 23:52:20 +0000
commit1a0a934547909744a6a2fa4cfd5b795ec6394f05 (patch)
tree23294a96f715e1e5bc35c1029ec151c90ee95b96 /lib/libc/stdlib/qsort.3
parente37a7c5f5a689c6f1994a879f5fa86066b7aac82 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/qsort.3')
-rw-r--r--lib/libc/stdlib/qsort.315
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index 6dfffd6fa42ac..07777db8efc37 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -149,11 +149,13 @@ The
.Fn qsort
and
.Fn qsort_r
-functions are an implementation of C.A.R. Hoare's
+functions are an implementation of C.A.R.
+Hoare's
.Dq quicksort
algorithm,
-a variant of partition-exchange sorting; in particular, see D.E. Knuth's
-Algorithm Q.
+a variant of partition-exchange sorting; in particular, see
+.An D.E. Knuth Ns 's
+.%T "Algorithm Q" .
.Sy Quicksort
takes O N lg N average time.
This implementation uses median selection to avoid its
@@ -161,10 +163,13 @@ O N**2 worst-case behavior.
.Pp
The
.Fn heapsort
-function is an implementation of J.W.J. William's
+function is an implementation of
+.An "J.W.J. William" Ns 's
.Dq heapsort
algorithm,
-a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H.
+a variant of selection sorting; in particular, see
+.An "D.E. Knuth" Ns 's
+.%T "Algorithm H" .
.Sy Heapsort
takes O N lg N worst-case time.
Its