def binarySearch(n, data, target):
begin = 0
end = n - 1
while(begin <= end):
middle = (begin + end) // 2
if data[middle] == target:
return middle
elif data[middle] < target:
start = middle + 1
else:
end = middle - 1
return None
def bubbleSort(data, n):
for i in range(n-1, 1):
for j in range(0, i):
if data[j] > data[j+1]:
data[j], data[j+1] = data[j+1], data[j]