4 ms·
Funny that the Author says counting sort is O(n) when it's really O(n+r). It's almost like making interviews around the knowledge of some case specific sorting
by tuxxy 7y ago
Funny that the Author says counting sort is O(n) when it's really O(n+r). It's almost like making interviews around the knowledge of some case specific sorting algorithm is a bad idea...
- gopiandcode 7y agoGiven that in the problem the value of r was fixed to 1000, the specific algorithm that would solve the problem instance would have been O(n) in terms of the input size.