So here is the question:
Suppose you have 100 thousand integers which ranges from 1 to 1 million. Please sort out the integers. The time complexity should
Sounds like a straightforward counting sort.
Space is constant. Runtime is O(n).