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

UPTET Paper 1: PYP Held on 23rd Jan 2022 (Shift 1)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 Mins
languageIcon English
Free
Must Attempt

UPTET Paper 2 Social Science : PYP Held on 23rd Jan 2022 (Shift 2)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 Mins
languageIcon English
Free
Must Attempt

UPTET Paper 2 Maths & Science : PYP Held on 23rd Jan 2022 (Shift 2)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 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
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow