test 01 question 34 LIFO structures

This commit is contained in:
Xevion
2019-11-28 01:15:57 -06:00
parent ca1eca7675
commit d29b8d0f54

View File

@@ -549,6 +549,12 @@ The list of these numbers is the output.
## Question 34
LIFO means "Last In, First Out".
This means, the last item to be put in is the first item to be extracted.
For example, the numbers 4, 3, 7, 8, and 16 are put into a data structure that operates in a LIFO manner. When a program thereafter attempts to extract numbers, they are extracted in reverse, i.e. 16, 8, 7, 3, and 4.
**Stack**s operate in this manner, simply think of them as a stack of bricks, cards, boxes etc. You can't extract the bottom item first (because it has a buch of items on top) before you extract the one before it (on top). You must extract the one on top (the last one you placed) before any other.
## Question 35
## Question 36