Big O Notation Explained: Time Complexity, Space Complexity, and Why They Matter in Interviews
Master Big O notation: measure algorithm efficiency from O(1) to O(n²) with growth diagrams, worked examples, and the interview mental model.
Search for a command to run...
Articles tagged with #coding-interview
Master Big O notation: measure algorithm efficiency from O(1) to O(n²) with growth diagrams, worked examples, and the interview mental model.
Collapse O(n²) pair-search problems to O(n) by converging two index boundaries on a sorted array.

A Trie stores strings character by character — enabling O(L) prefix queries no HashMap can match.

Eliminate redundant subarray re-scanning by maintaining a running aggregate across an expanding and shrinking boundary.

Sort once, sweep once: three full Java solutions for the merge intervals pattern used in every scheduling system.

Master prev, curr, and next — the three-pointer pattern that unlocks full reversal, sub-list reversal, and K-group rotation in O(1) space.