Skip to content

Coding patternsArrays and strings

Coding patterns for arrays and strings

Hash maps and prefix sums, two pointers, sliding windows, binary search and stacks turn an O(n²) scan into one pass. Then linked lists, intervals, matrices, bits and greedy choices.