it showing one wrong answer but my algo is correct.
Find the greater element
@ankitdelhi20
Your code gives wrong outputs for inputs n <= 2.
Input :
2
8 5
Expected Output :
-1 8
Your Output :
8
it showing one wrong answer but my algo is correct.
@ankitdelhi20
Your code gives wrong outputs for inputs n <= 2.
Input :
2
8 5
Expected Output :
-1 8
Your Output :
8