Cyclically Shifted Array

August 4, 2018 comments 107 Reads

An array is “cyclically sorted” if it is possible to cyclically shift
its entries so that it becomes sorted.
The following list is an example of a cyclically sorted array:
A = [4, 5, 6, 7, 1, 2, 3]
Write a function that determines the index of the smallest element
of the cyclically sorted array.
This video is one part of the Binary Search playlist on my channel. For more videos on binary search and how to apply it to various problems, check out the other videos: