Solve the binary searching a number in a white space separated string problem in O(lgn * m).