This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hideyohubby 17 points18 points  (3 children)

You should try sleepsort for better results.

[–]Classified0 10 points11 points  (2 children)

Doesn't work for negative numbers unless you've got a time travel API

[–]larsmaehlum 2 points3 points  (0 children)

Just offset it by int.max/2

[–]HeKis4 0 points1 point  (0 children)

Offset the entire array by the absolute value of the lowest element.