![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
.On topic: Here are some sorting methods (also found here.) Stable
What I'm not getting is why quicksort is not stable.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#22 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Because two identical records won't necessarily wind up in the original order. By identical, I mean identical insofar as the key. The remainder of the record could exhibit differences. Jean Jones and Bob Jones, for example, sorted on last name.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#23 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
I still don't quite get what you're saying. Jean Jones and Bob Jones are not compared in full then?
By the way I learned a lot from this which has some nice information on searching, sorting, graphs, hashing etc.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#24 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#25 |
|
Hobbyist Programmer
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4
![]() |
@nnixon: even if two entries are totally identical they still get switched around with respect to each other, you can see it from animation on the site you linked.
Last edited by EverLearning; Jun 15th, 2005 at 4:24 PM. Reason: sorry, English |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|