My question got evaluated but I have a doubt that the logic I used is appropriate. I have created a circular array.
Find the greater element
Hi Anish, The time complexity of your code is O(n^2) whereas it can be reduced to O(n).
Hint
Use Stack : )
Think of it … its pretty easy .