O(0.5 * (N + U) * log N) and O(N log N) are the same
That's exactly what the last sentence in my previous post said!
So, for a set where O(N log U) is different from O(N log N), the chances of two random elements to be the same is actually pretty high.
Only for very degraded cases where there is an element that appears with probability near to 1.
In reply to Re^15: In-place sort with order assignment (runs)
by salva
in thread In-place sort with order assignment
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |