Find the Output

Explaination

Find the Output

Explaination

Find the Output

Explaination

Find the Output

Explaination

maximum Element | HackerRank | Try Out

You have an empty sequence, and you will be given queries. Each query is one of these three types:
1 x -Push the element x into the stack.
2 -Delete the element present at the top of the stack.
3 -Print the maximum element in the stack.

Try Now