C/C++ Backtracking Programs Last Updated : 25 Jan, 2024 Backtracking is a problem-solving approach in which every possible solution is tested against the specified constraints. In Backtracking, if a solution fails to meet the given constraints, the algorithm retraces its steps to a previously verified point along the solution path. Backtracking can be viewed as the improvement of the brute-force method as the remaining solutions in the solution path are not considered when an incorrect solution is encountered. In this article, we will discuss some of the top backtracking practice problems in the C/C++ language. Prerequisite: Backtracking Algorithms Backtracking Problems in C/C++ The following is the list of C/C++ programs based on the level of difficulty: Easy Program to Print All Permutations of Given String Program to Print All Possible Paths from Top Left to Bottom Right of an MxN Matrix Program to Generate All Possible Valid IP Addresses from Given String Print All Possible Strings that can be made by Placing Spaces Sum of XOR of All Possible Subsets Find All Unique Subsets of a Given Set Make All Combinations of Size K Print All Combinations of Balanced Parentheses Combinational Sum Print All Possible Words from Phone Digits Medium Subset Sum Problem Check if a Given String is Sum-string Find the Maximum Number Possible by Doing at-most K Swaps Number of Paths with Exactly K Coins Hamiltonian Cycle Tug of War Rat in a Maze Given a String, Print All Possible Palindromic Partitions The Knight’s Tour Problem M Coloring Problem Hard Boggle (Find All Possible Words in a Board of Characters) | Set 1 Permutation of Numbers Such that Sum of Two Consecutive Numbers is a Perfect Square Word Ladder (Length of Shortest Chain to Reach a Target Word) Printing All Solutions in N-queen Problem Algorithm to Solve Sudoku | Sukdoku Solver Find Kth Permutation Remove Invalid Parentheses N Queen Problem Partition of A Set into K Subsets with Equal Sum Word Break Problem Using Backtracking Share your thoughts in the comments Add Your Comment Please Login to comment...