implemented the Binary Search algorithm for int