Ad
  • Custom User Avatar

    sorry for the maybe stupid question, but why reverse the item when using Deque as Stack ?
    from the Deque doc: "When a deque is used as a stack, elements are pushed and popped from the beginning of the deque"
    why not use addFirst() and removeFirst() then ?