🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1021

Re: Advice needed for fastest sort algorthm

#1021
From: John A. Slagel
Date: Sat, 07 Nov 1992 20:46
22 lines
1466 bytes
kds@phy.duke.edu (Stokes Kevin) writes:


>  This new project has objects much closer to the observer, and I fear
>there may be significant changes in the list order between every sort.
>Which sorting algorthm is the most time efficient?

   Definately the quick sort.  Its even built into ANSI C specs, so it
   should be easy to implement.  Look up quicksort in your C manual. If
   I remember right, bubble sort works in O(n*n) and quicksort works in
   O(n*log n).

   In other words, if you're sorting n objects, QuickSort takes "on the Order
   of" n*log n steps, while bubble sort takes "on the order of" n*n steps.

   If you happen to have Microsoft C, check out the sortdemo program that
   comes with it as a sample program.  It graphically show you the difference
   between the sorting methods.

-- 
------------------------------------------------------------------------
  John A. Slagel, email: jas37876@uxa.cso.uiuc.edu
Technical Details
Message-ID: <BxD5pt.DyI@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
References: <6759@news.duke.edu>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Subject: Re: Advice needed for fastest sort algorthm
References: <6759@news.duke.edu>
Message-ID: <BxD5pt.DyI@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Date: Sat, 7 Nov 1992 20:46:40 GMT
Lines: 22