Which of the following operation(s) is/are the basic operation(s) of a queue?…
2018
Which of the following operation(s) is/are the basic operation(s) of a queue?
(i) Enqueue
(ii) Dequeue
- A.
Only (i)
- B.
Neither (i) nor (ii)
- C.
Both (i) and (ii)
- D.
Only (ii)
Attempted by 240 students.
Show answer & explanation
Correct answer: C
The correct option is C: Both (i) and (ii). A queue is a FIFO (First-In, First-Out) data structure. Enqueue is the basic operation used to insert an element at the rear (end), while Dequeue is the basic operation used to remove an element from the front.