Useful Algorithms

A toolbox of must-know algorithms — searching, sorting, and graph traversal — built up step by step so you can reproduce them from memory.

These aren’t tied to a single LeetCode problem — they’re the building blocks that show up across hundreds of them. Learn each one until you can type it out without thinking.