LeetCode 958: Check Completeness of a Binary Tree
A clear explanation of checking whether a binary tree is complete using level-order traversal.
25 notes
A clear explanation of checking whether a binary tree is complete using level-order traversal.
A clear explanation of Design Circular Queue using a fixed array, a front pointer, and a size counter.
A clear explanation of solving Reveal Cards In Increasing Order using sorting and queue simulation over indices.
A clear explanation of solving Stamping The Sequence using reverse simulation and BFS-style processing.
A clear explanation of solving Number of Recent Calls using a queue as a sliding time window.
A clear explanation of counting how many words are subsequences of a string using waiting queues.
A clear explanation of computing the maximum width of a binary tree using level-order traversal and complete-tree indices.
A queue-based simulation for predicting which party wins after senators ban opponents in turn order.
An array-based circular buffer solution for implementing a fixed-size double-ended queue.
A breadth-first search solution for computing the average value of nodes at each level of a binary tree.
A detailed explanation of implementing a FIFO queue using two LIFO stacks with amortized constant time operations.
Check whether nums is the unique shortest supersequence of given subsequences using topological sorting.
Traverse an N-ary tree level by level using breadth-first search.
A clear explanation of designing a phone directory that can allocate, check, and release numbers efficiently.
A clear explanation of designing a hit counter for the last 5 minutes using a queue with compressed timestamps.
A clear explanation of rearranging a string so equal characters are at least k positions apart using a heap and cooldown queue.
A clear explanation of Moving Average from Data Stream using a queue and rolling sum.
A multi-source BFS solution for filling each empty room with its shortest distance to the nearest gate.
A queue-based iterator design for returning elements from two vectors in alternating order, with a clean extension to k vectors.
A clear explanation of implementing a LIFO stack using only FIFO queue operations.
A clear explanation of finding the minimum depth of a binary tree using breadth-first search.
A clear explanation of returning binary tree levels from bottom to top using breadth-first search.
A clear explanation of zigzag level order traversal using breadth-first search and alternating level direction.
A clear explanation of binary tree level order traversal using breadth-first search and a queue.
Array and linked queues, deques, monotonic queues, priority buckets, delay queues, and concurrent queue designs.