Dynamic Programming Starts with a State, Not a Table
← Back to Blog & Articles Dynamic programming becomes much easier when you stop beginning with an array. Begin by […]
← Back to Blog & Articles Dynamic programming becomes much easier when you stop beginning with an array. Begin by […]
← Back to Blog & Articles Breadth-first search and depth-first search visit the same graph in different orders. The right […]
← Back to Blog & Articles A sliding window reuses information about a contiguous range instead of recomputing that range […]
← Back to Blog & Articles Two pointers is less a single algorithm than a way to avoid repeating work. […]
An algorithm that works on the happy path may still fail at the boundaries. Before declaring it finished, test: Empty […]
A stack and a queue both hold items, but they express different kinds of work. Choose a stack when the […]
Big-O notation describes how an algorithm’s work grows as its input grows. O(1): the work stays roughly constant. O(log n): […]
Good algorithm choices become easier when the major patterns are visible in one place. Choral Software has released a free […]
A good data structure does not merely store information. It makes the operation you care about cheap, clear, and difficult […]
Binary search is one of the clearest examples of how a small change in strategy can transform an algorithm. Instead […]