SkillByAIOpen interactive version →

Time & Space Complexity (Big-O)

Master Big-O analysis: growth rates, O, Omega and Theta, loops, recurrences and the master theorem, space, amortised analysis and practical optimisation.

Start course →

What you'll learn

Syllabus

Why We Analyse Algorithms

  1. Measuring Algorithms Without a Stopwatch
  2. Counting Operations and Best, Worst and Average Cases
  3. The Common Growth Rates

Asymptotic Notation

  1. Big-O: The Formal Definition
  2. Big-Omega, Big-Theta and Little-o
  3. Rules for Simplifying Complexity

Analysing Loops

  1. Single, Nested and Dependent Loops
  2. Logarithmic and Square-Root Loops
  3. Tricky Loop Patterns

Analysing Recursion

  1. Writing Recurrence Relations
  2. Recursion Trees and Exponential Recursion
  3. The Master Theorem

Space Complexity

  1. Measuring Memory Use
  2. Recursion and the Call Stack
  3. Time-Space Trade-offs

Complexity of Data Structure Operations

  1. Arrays, Dynamic Arrays and Linked Lists
  2. Hash Tables, Trees and Heaps
  3. Library Call Costs in Practice

Amortised Analysis, Sorting Bounds and Complexity Classes

  1. Amortised Analysis
  2. Sorting Complexities and the Lower Bound
  3. P, NP and Intractable Problems

Applying Complexity in Practice and Revision

  1. From Brute Force to Efficient Solutions
  2. Reading Constraints to Pick an Approach
  3. Pitfalls and Real-World Performance
  4. Revision and Interview Questions