Next Greater Element Only 1 test case not passing
Hello @arsh_goyal,
I tested your code for different possible test-cases that i can think of and here’s the result:
Example 1:
4
1 4 3 2
Expected Output:
4 -1 4 4
Your Output:
4 -1 -1 -1
4
4 4 4 4
Expected Output:
-1 -1 -1 -1
Your Output:
-1
Correct it.
Hope, this would help.
Give a like if you are satisfied.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.