Chapter quiz · Recursion & Backtracking

Test what you learned.

8 questions on Recursion & Backtracking. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Recursion — Chapter Quiz

Eight questions on base cases, V8 stack limits, divide-and-conquer, backtracking, and permutation/subset complexity.

0/ 9
  1. Question 1
    1

    What is the role of a base case in a recursive function?

  2. Question 2
    2

    Why does V8 (Node.js) not support true tail-call optimisation (TCO) in practice?

  3. Question 3
    3

    The divide-and-conquer paradigm splits a problem into subproblems, solves them recursively, then:

  4. Question 4
    4

    In a backtracking solution, what happens when the current partial solution violates a constraint?

  5. Question 5
    5

    What is the time complexity of generating all permutations of an array of n distinct elements?

  6. Question 6
    6

    Every recursive algorithm can be converted to an iterative one using an explicit stack.

  7. Question 7
    7

    The number of distinct subsets of a set with n elements (the power set) is ___.

  8. Question 8
    8

    Which of the following are good strategies to avoid call-stack overflow for deep recursion in Node.js? (Select all that apply)

    Select all that apply.

Pick an answer — instant feedback as you go.