Hacker News new | past | comments | ask | show | jobs | submit login

Use a lot of bits, increment upon re-use of the slot, and throw when the pattern reaches its maximum.

Alternatively, give each item a unique handle (again counting up) and implement some sort of lookup table to convert those handles into actual indexes.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: