A

Admin • 802.91K Points
Coach

Q. Which Deque method is equivalent to Stack’s peek()?

  • (A) peekLast()
  • (B) peekFirst()
  • (C) getLast()
  • (D) top()

Explanation by: Admin
peekFirst() returns the element at the top of the stack (front of deque).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.