A

Admin • 802.91K Points
Coach

Q. Which method in Deque is specifically designed to simulate stack's push operation?

  • (A) addFirst()
  • (B) offerFirst()
  • (C) push()
  • (D) enqueue()

Explanation by: Admin
`push()` adds an element to the front of the deque, simulating stack behavior.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.