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

Yes, you are right about advancing the start of the window until uniqueness is restored. So, basically just advance it by 1.

You could definitely use two indexes instead of a queue, and using indexes over an array will be faster than using a queue.



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

Search: