A queue data structure is most commonly described by which standard ordering…

2023

A queue data structure is most commonly described by which standard ordering principle?

  1. A.

    FIFO

  2. B.

    LIFO

  3. C.

    LILO

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 1392 students.

Show answer & explanation

Correct answer: A

Concept

An abstract data type is named by its insertion/removal discipline. A queue is the structure in which elements are removed in the same order they were inserted: insertion happens at the rear, removal happens at the front. The conventional name for this discipline is FIFO — First-In, First-Out.

Application

Trace inserting A, then B, then C into a queue, then removing all three:

  1. Insert A, B, C at the rear — front-to-rear order is A, B, C.

  2. Remove from the front — A leaves first, then B, then C.

  3. Removal order A, B, C equals the insertion order: the first element in is the first element out.

Two phrasings describe this one behaviour: FIFO (first inserted is first removed) and LILO (Last-In, Last-Out — the last inserted, C, is also the last removed). They are logically equivalent statements about a queue. The term carried by every standard reference, library, and syllabus, however, is FIFO; LILO is only an informal restatement and is not used as the named principle. Asking for the standard ordering principle therefore has a single intended term: FIFO.

Contrast

How the other choices fall out:

  • LIFO (Last-In, First-Out): the most recently inserted element is removed first — that is a stack, the opposite discipline to a queue.

  • LILO: a correct but informal description of queue behaviour, never the named standard principle for a queue, so it is not the term the stem asks for.

  • “More than one of the above”: tempting because FIFO and LILO both fit the behaviour, but the stem asks for the single standard principle name, which is uniquely FIFO.

  • “None of the above”: rejected because FIFO is itself a valid, standard queue principle and is present.

Result: the standard ordering principle of a queue is FIFO (First-In, First-Out).

Explore the full course: Up Lt Grade Assistant Teacher 2025