LeetCode 901: Online Stock Span
A clear explanation of Online Stock Span using a monotonic decreasing stack with accumulated spans.
7 notes
A clear explanation of Online Stock Span using a monotonic decreasing stack with accumulated spans.
A clear explanation of solving Number of Recent Calls using a queue as a sliding time window.
A clear explanation of maintaining the kth largest element in a stream using a fixed-size min heap.
A clear explanation of designing a hit counter for the last 5 minutes using a queue with compressed timestamps.
A clear explanation of designing a logger that prints each message at most once every 10 seconds using a hash map.
A clear explanation of maintaining disjoint sorted intervals from a stream using insertion and merging.
A two-heap data structure for adding numbers from a stream and returning the current median in constant time.