Solution Review: Cyclically Shifted Array

This lesson contains the solution review for the challenge to find the index of the smallest number in a cyclically shifted array.

We'll cover the following

Let’s reiterate the problem statement from the previous challenge.

You are required to write a function that determines the index of the smallest element of the cyclically shifted array.

An array is “cyclically shifted” if it is possible to shift its entries cyclically so that it becomes sorted.

Algorithm

Now we need to come up with a strategy to eliminate parts of the search space. Have a look at the slides below to take note of some observations

Get hands-on with 1200+ tech skills courses.