Deque or Double Ended Queue is a generalized version of Queue data structure that allows insert and delete at both ends. Below is an example program of deque in different languages.

Basics
In Different Languages
Easy Problems
- Minimize Maximum Adjacent Difference
- Substring with Maximum Frequency
- Prefixes as Suffixes of a String
- Level order in spiral form
- String after processing backspace characters
- Generate a Sequence by inserting positions
- Lexicographically largest permutation
- Check if Strings Can Be Made Equal
Medium Problems
- Implement Stack and Queue using Deque
- Generate Bitonic Sequence
- Rearrange Array Elements
- Longest Subarray with Absolute Difference ≤ X
- Reverse a Linked List in groups
- Max Sum Subsequence with K Distant Elements
- Nth term of given recurrence relation
- Max Subarray Length with K Increments
- Largest String after Deleting K Characters
- Segregate even and odd nodes in a Linked List
- Generate Permutation with Unique Adjacent Differences
- 0-1 BFS
- Min Deques to Sort Array
- Min Number by Applying + and * Operations