1/5
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Recursive Algorithms
Calls itself with smaller input values
Obtains the result for the current input by applying simple operations to the returned value for the smaller input
When to use Recursive Algorithms?
If a problem can be solved utilizing solutions to smaller versions of the same problem, and the smaller versions reduce to easily solvable cases
Back Substitution
Recursion Tree
Useful for visualizing what happens when a recurrence is iterated
It diagrams the tree of recursive calls and the amount of work done at each call
Master Theorem
When can you not use the Master Theorem?
T(n) is not monotone, e.g. T(n) = sin(x)
f(n) is not a polynomial, e.g., T(n)=2T(n/2)+2^n
b cannot be expressed as a constant