Recursion and Backtracking

Practice recursive thinking and state space.

1. What is the term for the condition that stops a recursive function from calling itself indefinitely?
2. Which of the following are common applications of backtracking algorithms?
3. Recursion always results in more efficient memory usage compared to iteration.
4. What is the process of building a solution incrementally, undoing steps when a dead end is reached, called?
5. In a recursive function, which part contains the logic that calls the function with modified parameters?
6. Which of the following are potential drawbacks of recursion?
7. Backtracking is a form of recursion that explores all possible solutions by incrementally building candidates and pruning invalid paths.
8. What term describes the maximum number of recursive calls that can be made before causing a stack overflow?
9. Which problem is most commonly solved using backtracking to explore all permutations of elements?
10. Which of the following problems are typically solved using backtracking?
11. A recursive function without a base case will eventually cause a stack overflow error.
12. What technique stores results of expensive recursive calls to avoid redundant calculations?
13. What is the time complexity of the naive (unoptimized) recursive Fibonacci function?
14. Which of the following are key steps in a backtracking algorithm?
15. Recursion and iteration are mutually exclusive; a problem cannot be solved using both approaches.
16. In backtracking, what term describes a partial solution that cannot be extended to a valid final solution?
17. Which problem uses backtracking to place non-attacking queens on an n×n chessboard?
18. Which of the following statements about recursion are true?
19. Backtracking is generally more efficient than dynamic programming for problems with overlapping subproblems.
20. What is the name of the recursive algorithm that moves disks between pegs with the minimum number of moves, following size constraints?
Answered 0 of 0 — 0 correct