From: Jerome Vouillon <vouillon@saul.cis.upenn.edu>
To: Oliver Xymoron <oxymoron@waste.org>
Cc: Rogier Wolff <R.E.Wolff@BitWizard.nl>,
Helge Hafting <helgehaf@idb.hist.no>,
Manoj Sontakke <manojs@sasken.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: quicksort for linked list
Date: 10 Mar 2001 11:15:32 -0500 [thread overview]
Message-ID: <d3zr905siqj.fsf@saul.cis.upenn.edu> (raw)
In-Reply-To: <Pine.LNX.4.30.0103091240130.5548-100000@waste.org>
In-Reply-To: Oliver Xymoron's message of Fri, 9 Mar 2001 12:52:45 -0600 (CST)
Oliver Xymoron <oxymoron@waste.org> writes:
> On Fri, 9 Mar 2001, Rogier Wolff wrote:
>
> > Quicksort however is an algorithm that is recursive. This means that
> > it can use unbounded amounts of stack -> This is not for the kernel.
>
> It is of course bounded by the input size, but yes, it can use O(n)
> additional memory in the worst case. There's no particular reason this
> memory has to be on the stack - it's just convenient.
You only need O(log n) additional memory if you sort the shortest
sublist before the longest one (and turn the second recursive call
into a loop).
As log n is certainly less that 64, one can even consider that
Quicksort only uses a bounded amount of memory.
-- Jerome
next prev parent reply other threads:[~2001-03-10 16:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-09 7:38 Manoj Sontakke
2001-03-09 8:36 ` Helge Hafting
2001-03-09 11:52 ` Rogier Wolff
2001-03-09 12:09 ` Thomas Pornin
2001-03-09 18:52 ` Oliver Xymoron
2001-03-10 16:15 ` Jerome Vouillon [this message]
2001-03-09 22:29 ` Michal Jaegermann
2001-03-10 18:50 ` Martin Mares
2001-03-10 23:54 ` Michal Jaegermann
2001-03-10 19:09 ` David Wragg
2001-03-12 19:20 ` Jamie Lokier
2001-03-13 6:59 ` James R Bruce
2001-03-09 18:23 ` Oliver Xymoron
2001-03-09 11:09 ` James R Bruce
2001-03-09 11:50 ` Alan Cox
2001-03-09 18:39 ` Oliver Xymoron
2001-03-09 13:46 ` James Lewis Nance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3zr905siqj.fsf@saul.cis.upenn.edu \
--to=vouillon@saul.cis.upenn.edu \
--cc=R.E.Wolff@BitWizard.nl \
--cc=helgehaf@idb.hist.no \
--cc=linux-kernel@vger.kernel.org \
--cc=manojs@sasken.com \
--cc=oxymoron@waste.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®