index for inserting in sorted list
def find_index(arr, n, B):
start = 0
end = n - 1
while start<= end:
mid =(start + end)//2
if arr[mid] == K:
return mid
elif arr[mid] < K:
start = mid + 1
else:
end = mid-1
return end + 1