The code previously used sort.Stable with the sorting interface. It
mistakenly used <= in the Less comparisons where it should have been
just <. This would 'break' stable sort in that it wouldn't be stable
(ie. sort order could change between calls) with 2 equal values.
This replaces the <= with < while also converting the code to use the
newer, and more appropriate, sort.StableSlice()... which uses a function
instead of the interface.
The code previously used sort.Stable with the sorting interface. It mistakenly used <= in the Less comparisons where it should have been just <. This would 'break' stable sort in that it wouldn't be stable (ie. sort order could change between calls) with 2 equal values.
This replaces the <= with < while also converting the code to use the newer, and more appropriate, sort.StableSlice()... which uses a function instead of the interface.