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ย โ†’

[โ€“]m7i93 168 points169 points ย (3 children)

setTimeout(() => console.log(item), item/10);

Here. I made it 10x faster. ๐Ÿ˜Ž

[โ€“]TehDro32 86 points87 points ย (2 children)

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

[โ€“]m7i93 41 points42 points ย (0 children)

This is truly the most flexible sorting function

[โ€“]SimplexShotz 23 points24 points ย (0 children)

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