LeetCode 975: Odd Even Jump
A clear explanation of counting good starting indices using next-jump preprocessing and dynamic programming.
16 notes
A clear explanation of counting good starting indices using next-jump preprocessing and dynamic programming.
A clear explanation of finding the maximum width ramp using a monotonic decreasing stack.
A clear explanation of summing subarray minimums using a monotonic stack and contribution counting.
A clear explanation of Online Stock Span using a monotonic decreasing stack with accumulated spans.
A clear explanation of splitting an array into the maximum number of chunks so sorting each chunk gives the fully sorted array.
Find how many days each temperature must wait for a warmer future day using a monotonic stack.
A clear explanation of constructing a maximum binary tree recursively using divide and conquer.
A clear explanation of finding the next greater element in a circular array using a monotonic stack.
A clear explanation of finding the next greater element using a monotonic decreasing stack and hash map.
A clear explanation of detecting a 132 pattern using reverse traversal and a monotonic stack.
A clear explanation of the Remove K Digits problem using a greedy monotonic stack.
A clear explanation of Create Maximum Number using monotonic stacks for subsequences and greedy merging.
A clear explanation of Remove Duplicate Letters using a greedy monotonic stack.
A clear explanation of the Verify Preorder Sequence in Binary Search Tree problem using a monotonic stack and lower bound tracking.
A detailed guide to solving Maximal Rectangle by converting each matrix row into a histogram and applying a monotonic stack.
A detailed guide to solving Largest Rectangle in Histogram with a monotonic increasing stack.