Perform the operations on stack.
You have an empty sequence, and you will be given queries. Each query is one of these two types.
1 x -Push the element x into the stack.
2 -Delete the element present from the top of the stack.
Complete the functions, push, pop, is_empty, is_full, and status. They must perform the actions as described above. The function, status displays the current available elements of stack, if it is not empty.
The size of the stack may range from 1 to 100.
The number of queries may range from 1 to 100.
The first line contains two integers. First integer represents maximum capacity of stack and second integer represents number of queries. Each of the next q lines contains a single query in the form described in the problem statement above. All queries start with an integer denoting the query type, but only query 1 is followed by an additional space-separated value, x, denoting the value to be enqueued.
5 4 # size is 5 and number of queries are 4
1 10 # Push 10
2 # Perform pop
1 13 # Push 13
1 11 # Push 11
13
11
3 1
1 22
22
5 5
1 10
1 20
1 30
1 40
1 50
10
20
30
40
50