The numbers will be removed in the order 30, 20, 10.
In a stack the last one in is the first one out (LIFO strategy). So, if we enter 10, 20 and 30 we will get out 30, 20 and 10.
Please check the image I drew for you.
- The top is showing the content of the stack after any operation
- The bottom text is what is happening during the operation