All test cases failed (run-error)

Please check my code: -

Sample testcase passed successfully

When n=1, you are not checking if the stack is empty or not. If it is empty, you have to display No Code.
This is mentioned in the question.

1 Like

@ambuj_0909 Please mark your doubt as resolved now.