You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Deque<E> interface (short for Double-Ended Queue, pronounced "deck") extends Queue<E> and SequencedCollection<E>.
2
+
3
3
It represents a linear collection that allows insertion and removal of elements from both ends.
4
4
5
5
Most implementations of Deque do not impose a fixed size limit, but capacity-restricted deques can be implemented as well.
6
6
7
-
Operations
8
-
This interface provides methods for insertion, removal, and examination of elements at both ends of the deque. Each operation comes in two forms:
7
+
Operations:
8
+
9
+
This interface provides methods for insertion, removal, and examination of elements at both ends of the deque.
9
10
11
+
Each operation comes in two forms:
10
12
Throws an exception if the operation fails.
11
13
Returns a special value (null or false) if the operation fails.
12
14
13
-
### **Deque<E> (java.util)**
15
+
Deque<E> (java.util)
14
16
15
-
#### **Overview**
16
-
The `Deque<E>` interface (short for **Double-Ended Queue**, pronounced "deck") extends `Queue<E>` and `SequencedCollection<E>`. It represents a **linear collection** that allows **insertion and removal of elements from both ends**.
17
+
Overview:
18
+
The `Deque<E>` interface (short for **Double-Ended Queue**, pronounced "deck") extends `Queue<E>` and
19
+
`SequencedCollection<E>`.
17
20
18
-
Most implementations of `Deque` **do not impose a fixed size limit**, but capacity-restricted deques can be implemented as well.
21
+
It represents a linear collection that allows **insertion and removal of elements from both ends.
19
22
20
-
---
23
+
Most implementations of `Deque` do not impose a fixed size limit, but capacity-restricted deques can be implemented
24
+
as well.
21
25
22
-
##### Summary of Deque Methods
26
+
27
+
Summary of Deque Methods:
23
28
24
29
| Operation | First Element (Head) | Last Element (Tail) |
0 commit comments