From f4718831ca31f2c332ba0d22301220f417b08114 Mon Sep 17 00:00:00 2001 From: nickysn Date: Wed, 6 Feb 2019 12:22:08 +0000 Subject: [PATCH] * fixed quicksort comment about memory use - our implementation uses O(log n) stack, not O(n log n) git-svn-id: trunk@41236 - --- rtl/inc/sortbase.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/inc/sortbase.pp b/rtl/inc/sortbase.pp index 487e2bf5cf..c08be500ae 100644 --- a/rtl/inc/sortbase.pp +++ b/rtl/inc/sortbase.pp @@ -46,7 +46,7 @@ type Average performance: O(n log n) Worst performance: O(n*n) - Extra memory use: O(n log n) on the stack + Extra memory use: O(log n) on the stack Stable: no Additional notes: Uses the middle element as the pivot. This makes it work well also on already sorted sequences, which can occur