"HELP RAHUL TO SEARCH" Question problem

we have to sort in descending order then find the index of the number?

Hii Lavish,
Provide the question link

https://hack.codingblocks.com/contests/c/588/433

Hi Lavish
Yes, this can be one approach to solve the question. But as clearly mentioned in the question itself, rahul doesn’t have time to sort the elements. Therefore, you need to think of a different approach to find the given number.

In this question rotate means if 1,2,3,4 then after rotate it becomes 4,3,2,1?
Also in sample Input we have taken the arrays of unsorted elements, Plz explain the sample input and output.

Hi Lavish,
In input user first give you the length of array and in the given sample input it is 5. Then it will give you a rotated array and after this the element you have to find in the given array. In the sample input you have give the array:
4 5 1 2 3
Which is originally 1 2 3 4 5 (sorted one) and element you have to find is 2 which is in the given array is at index 3