Ask Question

Queue is the LIFO structure.

o True

o False

+2
Answers (1)
  1. 9 May, 07:34
    0
    The answer is False.

    Explanation:

    By definition LIFO structure is defined by: Last In, First Out.

    By definition FIFO structure is defined by: First In, First Out.

    A queue has the basics operations push () and pop () where:

    push (element) stores the element at the end of the queue. element = pop () retrieves the element at the beginning of the queue.

    For example:

    If you insert the elements doing the push (e) and q. pop (e) operation:

    Queue q;

    Element e;

    q. push (2); / / q = {2};

    q. push (5); / / q = {2, 5};

    q. push (6); / / q = {2, 5, 6};

    q. pop (e); / / q = {5, 6}; e = 2;

    q. push (12); q = {5, 6, 12};

    q. pop (e); / / q = {6, 12}; e = 5;

    Note: A stack is a LIFO structure.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Queue is the LIFO structure. o True o False ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers