A

Admin • 832.27K Points
Coach

Q. Which operation simulates stack behavior using Deque?

  • (A) offerFirst() and pollLast()
  • (B) push() and pop()
  • (C) addLast() and removeFirst()
  • (D) peekLast() and pollFirst()
  • Correct Answer - Option(B)
  • Views: 129
  • Filed under category Java
  • Hashtags: Java Deque

Explanation by: Admin

push() and pop() simulate stack behavior (LIFO).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.