Re: "Sorting" assignment
- From: "Bartc" <bc@xxxxxxxxxx>
- Date: Tue, 05 Feb 2008 10:51:29 GMT
spinoza1111 wrote:
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.
Well, increasing N by x10 will I guess increase the Time by x100. But at
what levels of N could it still be useful?
I'd made a claim in this thread that bubble sort's speed might be acceptable
for N in the hundreds. My test (on simple memory-based data and on my
machine) showed this could well be true.
I'd also suggested sorting the data in-place (we don't know how the data is
stored, it could be read-only, or too big to move around), introducing a
slight twist which in the dozen lines of a bubble sort could be easier to
appreciate before attempting a quicksort solution.
--
Bart
.
- Follow-Ups:
- Re: "Sorting" assignment
- From: Malcolm McLean
- Re: "Sorting" assignment
- References:
- "Sorting" assignment
- From: Ivica
- Re: "Sorting" assignment
- From: spinoza1111
- Re: "Sorting" assignment
- From: Bartc
- Re: "Sorting" assignment
- From: spinoza1111
- "Sorting" assignment
- Prev by Date: Re: best language
- Next by Date: Re: best language
- Previous by thread: Re: "Sorting" assignment
- Next by thread: Re: "Sorting" assignment
- Index(es):
Relevant Pages
|