I was reading wikipedia article on Radix sort and while describing its efficiency, it says
Radix sort efficiency is
O(d·n)
for n keys which haved
or fewer digits. Sometimesd
is presented as a constant, which would make radix sort better (for sufficiently largen
) than the best comparison-based sorting algorithms, which are allO(n·log(n))
number of comparisons needed. However, in generald
cannot be considered a constant. In particular, under the common (but sometimes implicit) assumption that all keys are distinct, thend
must be at least of the order oflog(n)
, which gives at best (with densely packed keys) a time complexityO(n·log(n))
.
Now what I don't understand is he line - assumption that all keys are distinct, then d
must be at least of the order of log(n)
What exactly is it trying to say?