Respuesta :

Answer:

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.

Otras preguntas

ACCESS MORE