Dynamic Programming21 sections · 916 units
Open in CourseQuiz: Recursion vs Iteration
When to use which
Check Your Understanding
When is recursion generally preferred over iteration?
- A.When the problem has natural recursive structure like trees or divide-and-conquer
- B.When you need maximum memory efficiency
- C.When the input size is very large
- D.When you want the fastest possible execution