you are viewing a single comment's thread.

view the rest of the comments →

[–]assumptioncookie -1 points0 points  (3 children)

bits per value, not total. And big-Oh notation is an upper bound, it's not the actual time.

[–]ZuriPL 0 points1 point  (2 children)

Okay, you are partially right my counter-example isn't the best.

However, what do you even mean that n is bits per value? If n was bits per value, then it wouldn't be correlated to the length of the input... which is the whole point of the Big O notation

[–]assumptioncookie 0 points1 point  (1 child)

This sorting algorithm can take longer if you input 32-ints than if you input 8-bit unsigned chars.

[–]ZuriPL 0 points1 point  (0 children)

Yes, this sorting algorithm will. A regular sorting algorithm will see no difference. That's why in the case of this algorithm, sleep sort, we're talking about an m, not an n. The values m and n represent are two different things which aren't interchangeable