Note The text on this site sometimes uses “T.C.” to mean time complexity and “S.C.” to mean space complexity. Algorithms¶ Topics Big-O of Arrays and Objects Time Complexity Big O of Object Operations Big O of Array Operations Space Complexity Primitive Types Reference Types Code Examples sum() array Unit Tests sum(xs) v1 sum(xs) v2 sum(xs) v3 calcSubtotals(xs) Unit Tests calcSubtotals(xs) v1 Space Complexity Examples Sum Array of Numbers Double Array of Numbers Logarithms Problem-Solving Understand The Problem Concrete Examples Frequency Counter Example Break It Down v1 v2 Solve the problem (or a simplified version of it) charCount() example step by step v1 Simplest Scenario v2 Uppercase and Lowercase v3 Ignore Non-Alphanumeric Chars v4 Refactor Regexp Bit Into Helper Function Helper Functions add(x, y) isEven(n) Split Int Into Even Parts TypeScript Unit Tests v1 v2 References