Category Archives: Backtracking

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… Read More
Given an undirected graph and a number m, determine if the graph can be coloured with at most m colours such that no two adjacent… Read More
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… Read More
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… Read More
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… Read More
Backtracking is an algorithmic paradigm that tries different solutions until finds a solution that “works”. Problems which are typically solved using backtracking technique have the… Read More
A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with… Read More
The eight queens problem is the problem of placing eight queens on an 8×8 chessboard such that none of them attack one another (no two… Read More