It's quite silly to have this override which nonetheless makes
assumptions about the input type. Encode the actual complexity of the
sort.
Also, simplify the sorting logic, and fix a bug (grab min and max
*after* the sort, not *before*!)
ac1e73e249mlugg committed on 7/31/2025, 9:10:22 PMparent04d7b49