Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1013 Bytes

module10-quiz.md

File metadata and controls

39 lines (30 loc) · 1013 Bytes

Module 10: Backtracking

In this module, we will explore backtracking algorithms used for generating combinations, permutations, and solving constraint satisfaction problems.

Topics Covered

  • Backtracking generation
  • Combinations and permutations

Key Problems

  • Generate Parentheses
  • Letter Combinations
  • Combination Sum III

Quiz

  1. What is backtracking primarily used for?

    • A) To optimize the performance of algorithms
    • B) To find all possible solutions to a problem
    • C) To sort an array
  2. Which of the following problems can be solved using backtracking?

    • A) Sudoku
    • B) N-Queens
    • C) Both A and B
  3. In generating parentheses, what is a valid pair?

    • A) (())
    • B) (()()
    • C) ())(
  4. What is the main advantage of using backtracking?

    • A) It requires less memory
    • B) It can handle large datasets
    • C) It can find all possible solutions efficiently
  5. How many combinations are there to select 2 items from [1, 2, 3]?

    • A) 2
    • B) 3
    • C) 6