Re: "Sorting" assignment
- From: spinoza1111 <spinoza1111@xxxxxxxxx>
- Date: Mon, 4 Feb 2008 18:51:53 -0800 (PST)
On Feb 5, 1:01 am, "Bartc" <b...@xxxxxxxxxx> wrote:
spinoza1111 wrote:
On Feb 4, 2:28 am, "Ivica" <prljavi_blu...@xxxxxxxxxxx> wrote:
I am looking at switch case usage and bubblesort?
If you use the bubble sort, your application may be too slow to manage
realistic amounts of news, and it appears you ganged up on your
<snip sort code>
Yes that's pretty fast, although up to N=1000, I could not detect mu
Hint: draw the curve for x=y**2 or draw the curve for x=log(y) and
rotate it 90 degrees. Magnify the curve near zero. The quicksort and
similar algorithms take a while to get started, of course, on
overcoming the speed of bubble or interchange sorts.
difference between this and bubble sort. At N=10K there was a clear
difference, although bubble sort still took only 0.75secs (at N=100K there's
no contest).
But bubble sort has the huge advantage of being extremely simple. For this
assignment, may be best to get /anything/ working first then worry about
improving the sort speed, although I doubt the test data will be big enough
to show a difference.
--
Bart
.
- Follow-Ups:
- Re: "Sorting" assignment
- From: Bartc
- Re: "Sorting" assignment
- References:
- "Sorting" assignment
- From: Ivica
- Re: "Sorting" assignment
- From: spinoza1111
- Re: "Sorting" assignment
- From: Bartc
- "Sorting" assignment
- Prev by Date: Re: "Sorting" assignment
- Next by Date: Re: best language
- Previous by thread: Re: "Sorting" assignment
- Next by thread: Re: "Sorting" assignment
- Index(es):
Relevant Pages
|