def find_pivot(array, high, low):
	"""
	Find the index of the pivot element
	""" 
	if high < low:
		return -1

	if high == low:
		return low

	mid = (high + low)/2

	if mid < high and array[mid] > array[mid + 1]:
		return mid

	if mid > low and array[mid] < array[mid - 1]:
		return mid - 1

	if array[low] >= array[mid]:
		return find_pivot(array, low, mid - 1)
	else:
		return find_pivot(array, mid + 1, high)