# find pivot in an sorted rotated array

#### Problem :

Given a sorted and rotated array find the index of a pivot element in an array.

**Input :** An array

**Output :** An index

**Algorithm :**

- Binary search tree

**Time complexity :** O(n) ; where n is the string length

**Space complexity :** O(1) ; constant

**Solution :**