4 ms·
Sure, just pick a sorting algorithm that uses constant memory and the optimal O(n lg n) time complexity: https://en.wikipedia.org/wiki/Sorting_algorithm#Compar
by Franciscouzo 9y ago
Sure, just pick a sorting algorithm that uses constant memory and the optimal O(n lg n) time complexity:
https://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_of_algorithms https://en.wikipedia.org/wiki/Sorting_algorithm#Comparison_o...
- Matheus28 9y agoThese need random access to use constant memory, he was talking about streaming access
- Franciscouzo 9y agoYeah, I didn't pay attention that you can't really store 1 million 32 bit integers in 2MiB without encoding/compressing them somehow.