A

Admin • 825.56K Points
Coach

Q. Which of the following can be used as both stack and queue?

  • (A) ArrayList
  • (B) Deque
  • (C) PriorityQueue
  • (D) Set

Explanation by: Admin
`Deque` can behave as both a queue (FIFO) and a stack (LIFO).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.