Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Optimize it by making the sleep time be log(x) instead of x or a fraction of x. That makes it O(log n) complexity :). Use any monotone increasing function really.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: