Write a function that takes in a sorted array of integers as well as a target integer. The caveat is that the numbers in the array have been shifted by some amount; in other words, they have been moved to the left or the right by one or more positions. For example, [1, 2, 3, 4] might become [3, 4, 1, 2]. The function should use a variation of the Binary Search algorithm to nd if the target number is contained in the array and should return its index if it is, otherwise -1.
Sample input: [45, 61, 71, 72, 73, 0, 1, 21, 33, 45], 33 Sample output: 8
Check this Python code.