1Use `collections.deque` in Python or `ArrayDeque` in Java — plain lists are O(n) for front removal.
2Monotonic deque for sliding window max: remove from back elements smaller than current, remove from front elements outside the window.
3For BFS level separation, snapshot `queue.size()` at the start of each level to know when to increment depth.
4Circular queue (implemented with array + two pointers) is space-efficient for fixed-size buffers.