hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    Question

    Queue data structure uses

    A.

    FIFO

    B.

    LIFO

    C.

    LILO

    D.

    More than one of the above

    E.

    None of the above

    Correct option is D

    A queue typically follows the FIFO (First In First Out) principle, where the first element inserted is the first one to be removed. However, the term LILO (Last In Last Out) can also apply to certain variations of queue systems in specific contexts, such as double-ended queues (Deque). Hence, FIFO is the general rule for a basic queue, while LILO might apply to specialized implementations.
    Important Key Points:
    1. FIFO (First In First Out):
    · The first element to be inserted is the first one to be removed.
    · Standard queue follows this principle.
    2. LIFO (Last In First Out): Not applicable to queues, but applicable to stack data structures, where the last element inserted is removed first.
    3. LILO (Last In Last Out): In some cases, deque (double-ended queue) can function in LILO mode, where elements can be added and removed from both ends, thus making LIFO behavior possible at one end and FIFO at the other.

    Free Tests

    Free
    Must Attempt

    DSSSB PRT Full Mock - 01

    languageIcon English
    • pdpQsnIcon200 Questions
    • pdpsheetsIcon200 Marks
    • timerIcon120 Mins
    languageIcon English
    Free
    Must Attempt

    Educational Psychology & Pedagogy - 01

    languageIcon English
    • pdpQsnIcon20 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon15 Mins
    languageIcon English
    Free
    Must Attempt

    DSSSB PRT PYP Held on 7th March 2022 Shift 1

    languageIcon English
    • pdpQsnIcon200 Questions
    • pdpsheetsIcon200 Marks
    • timerIcon120 Mins
    languageIcon English
    test-prime-package

    Access ‘BPSC TRE (11-12)’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    368k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow