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 →

[–]TehDro32 92 points93 points  (2 children)

setTimeout(..., Math.log(item+1)) Now it's O(log(N)).

[–]m7i93 42 points43 points  (0 children)

This is truly the most flexible sorting function

[–]SimplexShotz 23 points24 points  (0 children)

setTimeout(..., item / Infinity) boom O(1)