Prateek sir and coding

it is giving wrong answer but runs well on sample test case.
Pls check
link to solution -

@avinashmallik2017 Please print No Code in case the stack is empty.

        if (!s.empty())
        {
            cout << s.top() << endl;
            s.pop();
        }
		else cout<<"No Code"<<endl;

@avinashmallik2017 If you don’t have any further queries ,please mark the doubt as resolved.