def binarySearch(array, target):
    left=0
	right=len(array)-1
	while left<=right:
		mid=int((left+right)/2)
		if array[mid]==target:
			return mid
		elif array[mid]>target:
			right=mid-1
		elif array[mid]<target:
			left=mid+1
	
	return -1
