Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 52s1 days 16 hours 1 minutes 52 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 52s1 days 16 hours 1 minutes 52 seconds.

Sign in to watch this lesson
Algorithms - Foundations · 4:13
A function that solves a problem by calling itself on a smaller copy of it: the Tower of Hanoi replayed move by move beside its call stack, what each stack frame costs and how a million-deep DFS crashes an 8 MB stack on a Mac while the explicit-stack version sails through. Then the fib(5) recursion tree and its repeated work (fib(40) needs over 331 million calls, 79 with memoization), and how to read running times off recursion trees with recurrences and the master theorem.