H
Hal Fulton
Questions for you guys...
Correct my terminology and/or my perceptions if they
are mistaken.
1. I think the term "stable sort" is used for a sorting
algorithm that preserves the relative order of records
that have the same key -- correct?
2. Further I believe that such an algorithm could be used
to implement multi-key sorts as "chained" sorts -- correct?
people.sortname).sortage).sortheight)
3. Further I believe that Ruby's standard sort is not
stable. (Isn't it a quicksort-like thing?)
Given that, what is a good stable sort algorithm? Would
it be too inefficient to implement in Ruby or no?
Thanks,
Hal
Correct my terminology and/or my perceptions if they
are mistaken.
1. I think the term "stable sort" is used for a sorting
algorithm that preserves the relative order of records
that have the same key -- correct?
2. Further I believe that such an algorithm could be used
to implement multi-key sorts as "chained" sorts -- correct?
people.sortname).sortage).sortheight)
3. Further I believe that Ruby's standard sort is not
stable. (Isn't it a quicksort-like thing?)
Given that, what is a good stable sort algorithm? Would
it be too inefficient to implement in Ruby or no?
Thanks,
Hal