Having trouble understanding LIFO and FIFO.:( :confused:
![]() |
Having trouble understanding LIFO and FIFO.:( :confused:
First In First Out Stack
1
2
3
4
Item #1, then 2, then 3 and then item #4 or more complicated
Stack
1
2
3
4
Let's take item #1 and add a new item #5 so the stack is now
5
2
3
1
The next element we take is #5
Last In First Out Stack
1
2
3
4... 4 then 3 then 2 then 1
And if I take an element and add an element
1
2
3
4
Mmm! Sarah, Can you do any better? Your disagreement is 4 months late. The original poster had no problems with it.
Sorry, but I have to agree that it was very confusing.Quote:
Originally Posted by KeepItSimpleStupid
Although, Sarah, I do have to also agree that it's a bit useless to hand out negative reputations four months after the fact.
Ah, I was answering based on computer science terms thus the terminology of STACK which is a computer science term and for that matter was necessary to understand how early HP calculators operated using Reverse Polish Notation rather than algebraic.
If I had paid attention to the category, I would have answered it using accounting examples of say inventory. I learned both. Since, I come from an engineering background, the computer science example term took precedence.
Sorry, and thanks for the opportunity to clarify my position.
All times are GMT -7. The time now is 09:19 AM. |