Solving binary search problem from http://code-warrior.herokuapp.com.