implements a double-ended queue, which allows efficient insertion and deletion at both ends. This an excellent choice for stacks and queues. An ArrayDeque has these characteristics: Stack or queue. Supports operations to efficiently add, examine, or remove elements from either end. Automatically expands as data is added to either the front or back. No capacity limit. Good performance Adding, examining, or deleting and element at either end of an ArrayDeque is O(1). Generally faster than Stack. Generally faster than LinkedList for queue operations. ArrayDeque implements Iterable,
Read full article from Java: ArrayDeque
No comments:
Post a Comment