Commit f2505b6
committed
feat: add ArrayDequeDemo demonstrating double-ended queue operations in Java
Implemented ArrayDequeDemo.java to illustrate how ArrayDeque supports both queue
(FIFO) and stack (LIFO) behaviors. Demonstrates insertion using offerFirst(),
offerLast() and removal with pollFirst(), pollLast(), highlighting its O(1)
performance and flexibility as a non-thread-safe, resizable array-based deque.
Signed-off-by: https://github.com/Someshdiwan <someshdiwan369@gmail.com>1 parent 9c70287 commit f2505b6
1 file changed
Lines changed: 8 additions & 8 deletions
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
0 commit comments