A

Admin • 828.03K Points
Coach

Q. Which method is used to add an element to both ends in a Deque?

  • (A) offerFirst() and offerLast()
  • (B) push() and pop()
  • (C) addFront() and addBack()
  • (D) enqueue() and dequeue()

Explanation by: Admin
`offerFirst()` and `offerLast()` add elements to both ends in a Deque.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.