http://www.perlmonks.org?node_id=1056044


in reply to search algo to reach a number

Make a Google search on the following words: dichotomic search algorithm, binary search algorithm or half-interval search algorithm. This is likely to be your more efficient solution.