Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Power (Summary)

What you learned

1.1. Halving the problem size at each step gives O(logn)O(\log n) time.

2.2. Squaring a value lets you compute powers exponentially faster than repeated multiplication.

3.3. Recursive solutions create call stacks of depth O(logn)O(\log n), which you can eliminate with iteration if space matters.