A sorted array is rotated around a pivot element. Find the pivot element in the rotated sorted array.

Lets start with an example

Original array: 2, 4, 6, 8, 9, 10, 12, 15

Rotated array: 10, 12, 15, 2, 4, 6, 8, 9

Output: 3

**Analysis**Lets start with an example

Original array: 2, 4, 6, 8, 9, 10, 12, 15

Rotated array: 10, 12, 15, 2, 4, 6, 8, 9

Output: 3