STEM
Computer Science, step by step
Trace algorithms, reason about complexity and debug code, with explanations that show how a program behaves step by step.
Coverage
Topics we cover
- Programming fundamentals
- Data structures
- Algorithms and complexity
- Recursion
- Databases and SQL
- Discrete mathematics
Worked example
Computer ScienceSolved
Question
What is the time complexity of binary search?
- Step 1: Each comparison halves the remaining search space
- Step 2: After k steps, n ÷ 2ᵏ elements remain
- Step 3: Searching ends when n ÷ 2ᵏ = 1, so k = log₂ n
Get help with computer science today
Create a free account in under a minute. No credit card required.