Pivot of sorted and rotated array


getting wrong answers in all testcases.
pls tell correct code

Hey @yutikakhanna since it is mentioned in the question that " pivot is that element in the array which is greater than its next element", you can just iterate the array from 0 to n-2 and if i+1 element is smaller than the current element print the i and terminate the program
Here is code for reference purpose only https://ide.codingblocks.com/s/177760