rotated = [4, 5, 6, 7, 0, 1, 2]
left = 0
right = len(rotated) - 1
while left < right:
mid = (left + right) // 2
if rotated[mid] > rotated[right]:
left = mid + 1
else:
right = mid
print(left)
To embed this project on your website, copy the following code and paste it into your website's HTML: