Which of the following operation(s) is/are the basic operation(s) of a queue?…
2017
Which of the following operation(s) is/are the basic operation(s) of a queue?
(i) Enqueue
(ii) Dequeue
Answer: C. Both (i) and (ii) — 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…
- A.
Only (i)
- B.
Neither (i) nor (ii)
- C.
Both (i) and (ii)
- D.
Only (ii)
Attempted by 717 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.
Loading lesson…