Skip to content
Sharp

Collections · interview question

Which operation is invalid for a Queue interface?

Multiple choiceMediumchapter-4-curatedpremiumcollectionsqueue-and-deque-basics
Choose one answer
Answer and explanation

Correct answer

B. Push()

Why

The push() operation is invalid for a Queue because it's a stack operation. Queue operations are typically related to FIFO processing, while push() is used to add an element to the top of a stack.

Test yourself on Collections

A free test with instant, explained results. No account needed.

Start free test
All Collections questions →