Sliding Window
Solve fixed-window problems: maximum sum of k elements, moving averages, and O(n) updates as the window slides.
Break a problem into overlapping subproblems and reuse their answers to avoid recomputing the same work.
Find the most money you can rob from a row of houses without robbing two next to each other.
Find the fewest coins needed to make up a given amount from a set of coin values.
Find the length of the longest subsequence of an array that is strictly increasing.
Count how many distinct paths lead from the top-left to the bottom-right of a grid.
Find the length of the longest sequence that appears in the same order in two strings.
Check whether a string can be split into a sequence of words from a given dictionary.
Check whether an array can be split into two groups with equal sums.
Count how many ways a string of digits can be decoded into letters.
Count how many ordered combinations of numbers add up to a target value.
Find the fewest single-character edits needed to turn one word into another.
Check whether a string fully matches a pattern that supports "." and "*".
Find the maximum coins you can collect by bursting balloons in the best order.
Find the length of the longest substring of well-formed parentheses.
Solve fixed-window problems: maximum sum of k elements, moving averages, and O(n) updates as the window slides.
Scan a sorted array or string from both ends at once to find pairs, remove duplicates, or reverse data in O(n).
Cut a sorted range in half on every step to find a value or boundary in O(log n) instead of checking one by one.
Explore as far as possible down one path before backtracking, used to walk trees, graphs, and grids.
Explore level by level from a starting point, the go-to way to find the shortest path in an unweighted graph.
Try a choice, keep going, and undo it if it fails, used to generate permutations, combinations, and valid layouts.