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

For method 2, if you precompute the cumulative distribution function, you can do a binary search which is only O(log N) instead of O(N).


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

Search: