PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

The Bubble Sort 2468


Your Ad Here

Your Ad Here

Patrick Scheible

Filemode 79 2470
two other pieces of folklore somewhat related to the closing of burlington mall location 1) the...

If you just sort the keys, and leave the rest of the record in place, then you sort a fixed length item of key + pointer to rest of record, and the adjacency argument doesn't apply. Plus you spend less time moving data around.

Filemode 79 2469
David Kreuter the cp67 development group split off from the science center (on the 4th flr) and absorbed the boston programming center on the 3rd flr. a lot...

This bubble sort business keeps coming up. I really don't know why. If you are interested in sorting in memory, as opposed to external sorting on disk, then here are two clbuttes of sorts, those that take O(N^2) (insertion, selection and bubble sorts) and those that take O(NlogN) in the average case. If the amount of data you have is small, it really doesn't matter which method you use (within reason), but if you have a lot of data, then you should obviously choose an O(NlogN) method. Then, which particular algorithm you choose depends on your goal. Quicksort gives the best average time, but performs like O(N^2) in the worst case, while heapsort is slightly slower on average, but always O(NlogN). So you choose depending on what you want to guarantee.

--brian

-- "What's life? Life's easy. A quirk of matter. Nature's way of keeping meat fresh."



Your Ad Here

List | Previous | Next

Filemode 79 2469

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

The Bubble Sort 2467