by raphlinus · 8y ago · 0 comments
I got a worst case of exactly 2 MB (1.907 MiB) (all deltas being 4294, so the list is 0, 4294, 8588...), but maybe it's possible to get better than that.
It would be uber slow though, probably n^2.
(edit: better link)
For (I=0; I<1<<31; I++) For (J=0; J<1e6; J++) If (input[J]==I) print(I);
Shoddy runtime, but hey...
https://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_o...