Implementation of Buinary search