Code for problem "Search for a Range".