3 ms·
It doesn't invalidate what you say, but you're assuming there's a bounded number of different values in the array -- 2^k where k is your word size. Under this
by hnkain 10y ago
It doesn't invalidate what you say, but you're assuming there's a bounded number of different values in the array -- 2^k where k is your word size.
Under this assumption, a correctly implemented quicksort also runs in O(N) time.