Find Rotation Count
easy
1. Given an ascending sorted rotated array arr of distinct integers of size N. 2. The array is right rotated K times. 3. Your task is to find the value of K.
Constraints
1 <= N <=10^5 1 <= arr[i] <= 10^7
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
6
5 6 1 2 3 4
Sample Output
2
Question Video