Foundational 9
- TL;DR, not read
- Why it matters, not read
- How it works, not read
- Common pitfalls, not read
- Quick recall Q&A, not read
- Additional notes, not read
- O1 Constant TimeO(1) constant time means the work an operation does never grows with the size of the input — a million-entry dictionary lookup costs the same as a ten-entry one. Reaching it usually means choosing the right structure (hash tables,…, not read
- OLogN Logarithmic TimeO(log n) logarithmic time means each step throws away a constant fraction of the remaining work — doubling the data only adds one more step. This is the regime of binary search, balanced trees (SortedSet, SortedDictionary) and B-tree…, not read
- ON Linear TimeO(n) linear time means runtime grows in step with the input — doubling the data doubles the work. It's the floor for any algorithm that must look at every element (sums, filters, max/min, table scans), so the senior-engineer move is to…, not read
Mid-level 3
- ON2 Quadratic TimeO(n²) quadratic time grows with the square of the input — double the data and the work quadruples. It's the signature of nested loops over the same collection, Contains against a List<T> inside a loop, and naive string concatenation,…, not read
- ONLogN Linearithmic TimeO(n log n) linearithmic time is the cost of touching every element while also dividing the problem in half — the proven lower bound for comparison-based sorting, and the complexity of OrderBy, List.Sort, mergesort, heapsort, and most…, not read
- Space ComplexitySpace complexity measures how much memory an algorithm needs as input grows, and it's the other half of the performance picture next to time. Senior engineers actively trade between the two — caching turns O(n) lookups into O(1) at the…, not read