LIFO or FILO principle works on Stack - Data Structure

Q.  Which principle works on Stack?
- Published on 25 Aug 15

a. FILO
b. FIFO
c. LILO
d. LIFO or FILO

ANSWER: LIFO or FILO
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    Stack works on First in last out (FILO) or Last in first out (LIFO) principle. If you add an element, it goes on the top of the stack. If you want to delete, the element that is on the top of stack, will be delete. Push() function is used to insert new elements into the Stack and Pop() function is used to delete an element from the stack. Both insertion and deletion are allowed at only one end of Stack.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)