PDA

View Full Version : Lifo fifo


lsugarbaker
Nov 5, 2007, 08:42 PM
Having trouble understanding LIFO and FIFO.:( :confused:

KISS
Nov 5, 2007, 09:15 PM
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

KISS
Mar 10, 2008, 08:33 PM
Mmm! Sarah, Can you do any better? Your disagreement is 4 months late. The original poster had no problems with it.

morgaine300
Mar 13, 2008, 12:53 PM
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.

Although, Sarah, I do have to also agree that it's a bit useless to hand out negative reputations four months after the fact.

KISS
Mar 13, 2008, 02:22 PM
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.