Backtracking is an algorithmic paradigm that tries different solutions until finds a solution that “works”. Problems which are typically solved using ba...
Share
Subset sum problem is to find subset of elements that are selected from a given set whose sum adds up to a given number K. We are considering the set contains no...
Share
We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...
Share
Given an undirected graph and a number m, determine if the graph can be colored with at most m colors such that no two adjacent vertices of the graph are colored with...
Share
We have discussed Knight’s tour and Rat in a Maze problems in Set 1 and Set 2 respectively. Let us discuss N Queen as another example problem that can be solv...
Share
Given a partially filled 9×9 2D array ‘grid[9][9]’, the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and s...
Share
Hamiltonian Path in an undirected graph is a path that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a Hamiltonian Path such that t...
Share
1
Backtracking
Please wait while the activity loads. If this activity does not load, try ref...
Share
Newspapers and magazines often have crypt-arithmetic puzzles of the form:
SEND
+ MORE
--------
MONEY
--------
The goal here is to assign each letter a digit fr...
Share
Subset sum problem is to find subset of elements that are selected from a given set whose sum adds up to a given number K. We are considering the set contains no...
Share