Quiz: State-Based Backtracking

Test your understanding

Check Your Understanding

In Generate Parentheses, why can you add ')' only when close count < open count?

  1. A.')' is lexicographically larger than '('
  2. B.Every ')' must match a previous '(' that isn't yet matched
  3. C.It reduces the number of recursive calls
  4. D.It ensures the string has even length
Start the roadmap to answer the quizzes and solve the challenges