Given an array with n real numbers, each in the range [0,1], I need to sort them. Moreover, the only operations that are allowed are comparisons or copying.
It means I cannot multiply or divide the numbers, which prohibits me from using bucket sort.
From what I learned, when you use only comparisons you cant sort any faster that O(nlogn). That means that I can just use any sort algorithm that achieves this bound, let's say heapsort, and be done with it.
However, in this way i don't use the info that the numbers are from the range [0,1]. For this reason, I'm not sure if I'm right.