Skip to content

Tag Archives: Algorithms-Backtracking

Given an integer N, the task is to print all the possible ways in which N can be written as the sum of two or… Read More
Given an array arr[] of N integers and two numbers K and S, the task is to print all the subsquence of length K with… Read More
Prerequisites – Recursion, Backtracking and Stack Data Structure. A Maze is given as N*M binary matrix of blocks and there is a rat initially at… Read More
Given a string str, print of all the combinations of a string in lexicographical order. Examples: Input: str = "ABC" Output: A AB ABC AC… Read More
Given an undirected graph, print all the vertices that form cycles in it. Pre-requisite: Detect Cycle in a directed graph using colors   In the above diagram,… Read More
Prerequisites :  Recursion Complexity Analysis Backtracking is an algorithmic-technique for solving problems recursively by trying to build a solution incrementally, one piece at a time,… Read More
Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More
Which of the following is not a backtracking algorithm? (A) Knight tour problem (B) N queen problem (C) Tower of hanoi (D) M coloring problem… Read More