Question

What is the primary advantage of using recursion over iteration for certain problems (e.g., tree traversals)?

A Recursion always uses less memory.
B Recursion is always faster.
C Recursion can lead to more elegant and readable solutions that directly mirror the problem's recursive definition.
D Iteration cannot solve problems that recursion can.
E Recursion avoids stack overflow errors.
Practice Next

Hey! Ask a query