(translated by Google Translate)
Hello everyone.
Here is the solution that suddenly became obvious to me.
As you remember, my previous solution is that the value of an integer random number was used as an index of this number in the sorted array.
But, until yesterday, this method did not allow using arrays that contained fractional values or values that were larger than the size of the original array.
Last night, I saw in my mind's eye that if we use not the entire fractional random number as an index, but, for example, only the two left symbols of this number, then we get an INTEGER index of the auxiliary array of "boxes".
We place this entire number in the "box" with this index.
In this case, for all random numbers of the original array, the two left symbols must be used, which correspond to the same decimal places.
For example, if the array contains the numbers 123.4567 and 1.2345, then the two-digit index of the "box" for the first number will be 12, and for the second number = 00 (001.2345).
After all the random numbers of the original array are placed in the corresponding "boxes", we simply repeat this operation for each "box" that contains more than one number (we will create "boxes within boxes"). But this time, we use the next two symbols of the random numbers (for the number 123.4567 = 34 and for the number 001.2345 = 12).
This is the solution I have now.
I don't have the code yet. But you can write your version of the code until I publish mine.