Topic: Stack Problem / Level: beginner

Problem: Write a function to push elements from an array into a stack and pop elements until the stack is empty.

Run the code to see the output here...