Sort stability: Difference between revisions

→‎{{header|Ruby}}: remove (hide) stable sort talk/code
m (→‎{{header|Ruby}}: link to stable merge sort)
(→‎{{header|Ruby}}: remove (hide) stable sort talk/code)
Line 34:
# => [["UK", "Birmingham"], ["US", "Birmingham"], ["UK", "London"], ["US", "New York"]]</lang>
 
There seems to be some discussion debating whether stable sorting is worth the performance trade-off [[http://redmine.ruby-lang.org/issues/show/1089 2]].
 
<!--
To code a stable sort[[http://codesnippets.joyent.com/posts/show/1698 2]]:
<lang ruby>class Array
Line 63 ⟶ 66:
.map {|x| x.pop; x}
# => [["US", "Birmingham"], ["UK", "Birmingham"], ["UK", "London"], ["US", "New York"]]</lang>
-->
 
=={{header|Tcl}}==
Anonymous user