Hacker News new | past | comments | ask | show | jobs | submit
You can stop the recursion when you've found an index that is smaller than what you wanted to store.