Deque
One data structure to rule them all. A Deque (pronounced "Deck") is a double-ended queue that can add or remove elements from both ends in amortized constant time O(1). This allows us to replace Stack, Queue, and LinkedList with just four interfaces:
· addFirst()
· addLast()
· removeFirst()
· removeLast()
LeetCode
103. Binary Tree Zigzag Level Order Traversal
Python | Java
-
https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
https://leetcode.com/problems/binary-tree-level-order-traversal/
https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
https://leetcode.com/problems/deepest-leaves-sum/
https://leetcode.com/problems/valid-parentheses/
https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/