4 ms·
I think that works only if n-by-n can vary to infinity. Otherwise I'll just have a lut for every possible board size. By the same method, you can sort any fin
by clarry 7y ago
I think that works only if n-by-n can vary to infinity. Otherwise I'll just have a lut for every possible board size.
By the same method, you can sort any finite sequence in O(1).. but then you don't really sort infinite sequences, do you? So I'm not sure this is a good trick question.