What does the acronym LIFO mean?
LIFO stands for “last-in-first-out”. It means the last thing “push”ed onto the stack is the first thing that can be “pop”ped out.
What methods are available on a Stack data structure?
What must you do to access the value at an arbitrary point in a stack (not just the “top”)?
Use the “pop” method and store the popped value in a variable. Keep popping to get to the arbitrary point in the stack.