I have a set of sorted values $\left\{a_j \right\}_{1 \leq j \leq n}$, suppose now a number $x$ is given and we would like to find out the index $j$ such that $a_j \leq x < a_{j+1}$ (you can assume always $- a_1 =  a_n = +\infty$). I could find such index with a binary search on the lower bound (which would take $O(\log n)$). However I wonder if a search using some kind of hash function could be used to speed up the search, I think is a kind of similar problem, if not the same.
Hash function for searching, is that feasible?
sorting;hash;binary search