3 ms·
Note 1: Comparison sorting is O(n log (n)). In domains where the range of values is smaller than the number of elements (so there are duplicate values), sortin
by gohrt 11y ago
Note 1: Comparison sorting is O(n log (n)).
In domains where the range of values is smaller than the number of elements (so there are duplicate values), sorting can be faster.
https://en.wikipedia.org/wiki/Radix_sort https://en.wikipedia.org/wiki/Radix_sort
Note 2: for aribtrarily large sticks, is "lowering a sticky horizontal plate" a constant-cost operation? Or is it a factor of K (difference between largest and shortest object)?