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

You can just use this algorithm but ignore everything after the first k elements. The algorithm still works if you don't store anything beyond the first k elements but just pretend they are there.


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

Search: