Chapter 36 - Stacks INCOMPLETE Flashcards
1
Q
Explain the concept of a stack
A
A stack is a last in, first out data structure (LIFO).
Tip: this is like a Pringles can, the last item (crisp) is at the top and is taken out first.
2
Q
What are the two types of stack data structures?
A
A stack can be implemented as a static or dynamic data structure
3
Q
What can a stack be used for?
A
Stacks are used in calculations
Stacks are used to hold return addresses when subroutines are called