10 Matching Annotations
  1. Sep 2022
    1. “Deque” stands for “double-ended queue”; it’s supposed to be pronounced “deck”, but some people say “deek”. In Java, the Deque interface provides push, pop, peek, and isEmpty, so you can use a Deque as a stack.
    2. it is a collection that maintains the order of the elements. The primary difference between a stack and a list is that the stack provides fewer methods. In the usual convention, it provides:push: which adds an element to the top of the stack.pop: which removes and returns the top-most element from the stack.peek: which returns the top-most element without modifying the stack.isEmpty: which indicates whether the stack is empty.