Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hoare's qsort

48 views
Skip to first unread message

se19560...@gmail.com

unread,
Aug 30, 2016, 8:08:58 AM8/30/16
to

where do i change qsort to not order allready ordered stack?qsort is
ordo(N Lg N)

mecej4

unread,
Sep 19, 2016, 1:01:08 PM9/19/16
to
On 8/30/2016 7:08 AM, se19560...@gmail.com wrote:

> where do i change qsort to not order allready ordered stack?qsort is
> ordo(N Lg N)

Use something such as the median-of-three as the pivot element to do
the partitioning. See http://algs4.cs.princeton.edu/23quicksort/, for
example.

--
mecej...@nospam.invalid
(Replace four by 4, nospam by operamail, invalid by com,
and remove all underscores)
0 new messages