FIFO and LIFO are two opposite methods of stacking objects in sequence in data structures. FIFO, or first in first out, means that when adding an object to a stack or queue, the object is placed at the end of the line. With LIFO, or last in first out, you put it at the beginning. These methods have implications for how we process data because they cause items to naturally be processed from oldest to newest (LIFO) or newest to oldest (FIFO). LIFO and FIO are two opposite methods of stacking objects in sequence.
Loading image...