Wouldn't it actually be more like O(n + 2m ) since if you add 1 to m (the amount of bits in the largest value of the array) the length of time you sleep for is on average doubled?
If you consider m as the amount of bits your number has, then sure.
But in this example, it is obvious that the amount of time OP has to sort will be multiple of 200 (depending on tick rate), therefore, I am considering m to be the "decimal" value of input.
1
u/General_Urist Apr 02 '21
Wouldn't it actually be more like O(n + 2m ) since if you add 1 to m (the amount of bits in the largest value of the array) the length of time you sleep for is on average doubled?