DEV Community

Jayaprasanna Roddam
Jayaprasanna Roddam

Posted on • Edited on

DSA: Backtracking - questions

 1. Basic Backtracking Problems
·      Solve the N-Queens Problem
·      Solve the Sudoku Puzzle
·      Generate All Permutations of a String
·      Generate All Combinations of a String
·      Generate All Subsets of a Set
·      Generate All Possible Palindromic Partitions of a String
·      Solve the Rat in a Maze Problem
·      Solve the Word Search Problem (Finding a Word in a Grid)
·      Find All Valid Parentheses Combinations
·      Solve the K-Queens Problem
 
 2. Array and List-Based Backtracking Problems
·      Find All Subsets of a Given Set (Power Set)
·      Find All Combinations that Sum Up to a Target Value
·      Find All Unique Combinations of Numbers that Sum Up to a Target Value
·      Generate All Permutations of an Array
·      Find All Possible Combinations of an Array with a Specific Sum
·      Find All Possible Subsets of a Set with Duplicate Elements
·      Solve the Combination Sum Problem (with Repetitions Allowed)
·      Solve the Subset Sum Problem
·      Find All Distinct Permutations of a String with Duplicates
·      Generate All Possible K-Length Combinations of an Array
 
 3. String-Based Backtracking Problems
·      Generate All Possible Palindromic Partitions of a String
·      Find All Anagrams of a String in a Text
·      Solve the Crossword Puzzle Problem
·      24. Generate All Possible Valid IP Addresses from a String
·      25. Solve the Regular Expression Matching Problem
·      26. Generate All Possible Words from a Given Phone Number (Digit to Letter Mapping)
·      27. Find All Valid Words that Can Be Formed from a Given Set of Letters
·      28. Solve the Word Break Problem (Segment a String into Words)
·      29. Generate All Combinations of Parentheses
·      30. Find All Distinct Palindromes in a String

 4. Graph-Based Backtracking Problems
·      Find All Hamiltonian Paths in a Graph
·      Find All Eulerian Paths in a Graph
·      Solve the Graph Coloring Problem
·      Find All Possible Paths in a Directed Acyclic Graph (DAG)
·      Find All Possible Cycles in a Graph
·      Find All Strongly Connected Components in a Graph
·      Solve the Knights Tour Problem on a Chessboard
·      Solve the Hamiltonian Cycle Problem
·      Find All Simple Paths Between Two Nodes in a Graph
·      Solve the Traveling Salesman Problem (Approximate Solution)
 
 5. Constraint Satisfaction and Advanced Backtracking Problems
·      Solve the 8-Queens Problem on a Chessboard
·      Solve the Latin Square Problem
·      Solve the KenKen Puzzle
·      Solve the Kakuro Puzzle
·      Solve the Magic Square Problem
·      Solve the Sudoku Solver (with Constraint Propagation)
·      Solve the Puzzle by Moving Pieces (e.g., 8-Puzzle)
·      Solve the N-Queens Problem with Additional Constraints (e.g., No Two Queens in Same Row/Column/Diagonal)
·      Solve the Latin Square Problem with Given Constraints
·      Solve the Crossword Puzzle with Given Constraints
 

Top comments (0)