3 ms·
One could use a tree-based set, which would only require being comparable, but that would get us back to average-case O(n log n).
by scott_s 8y ago
One could use a tree-based set, which would only require being comparable, but that would get us back to average-case O(n log n).