PythiloMedium · 25 min · Task 70 of 100 · progress kept in this browser

Search a rotated sorted array

Return the index of target in a rotated strictly increasing integer list, or -1 if absent. Values are distinct.

items = [4, 5, 6, 0, 1, 2]
left, mid = 0, 2
print(items[left] <= items[mid])  # sorted half
Your task

Return the index of target in a rotated strictly increasing integer list, or -1 if absent. Values are distinct.