PIVOT OF SORTED AND ROTATED ARRAY
You are given a sorted but rotated array. You need to fine the index of the pivot element of the array where pivot is that element in the array which is greater than its next element and divides the array into two monotonically increasing halves.
Input Format:
The first line denotes N - the size of the array. The following N lines each denote the numbers in the array.
Constraints:
Output Format
Output the index of the pivot of the array.
Sample Input
5 4 5 1 2 3
Sample Output
1
when i submit my solution for this question it says test case fails…please help asap
solution - https://ide.codingblocks.com/#/s/28666