What happens if you try to dequeue from an empty queue ?
TPSC Computer/IT Posts · 2024 · Assistant Chief Electoral Officer (Computerization) · from our data (question pool)
What happens if you try to dequeue from an empty queue ?
- A.
It returns the last element added.
- B.
It throws an error or exception.
- C.
It returns a special value indicating emptiness.
- D.
It dequeues the next element, regardless of emptiness.
Attempted by 570 students.
Sign up free to check your answer
Sign up freeLoading lesson…