##
Combinational Sum
July 29, 2017

Given an array of positive integers arr[] and a sum x, find all unique combinations in arr[] where the sum is equal to x. The… Read More »

July 29, 2017

Given an array of positive integers arr[] and a sum x, find all unique combinations in arr[] where the sum is equal to x. The… Read More »

June 6, 2017

Given a positive number n, we need to find all the combinations of 2*n elements such that every element from 1 to n appears exactly… Read More »

April 28, 2017

N Queens Problem Warnsdorff’s Algorithm Word Break Problem Remove Invalid Parenthesis Match a pattern and string using regular expression Find Path from corner cell to… Read More »

March 28, 2017

Problem : A knight is placed on the first block of an empty board and, moving according to the rules of chess, must visit each… Read More »

February 19, 2017

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example,… Read More »

January 6, 2017

Given a string s, partition s such that every string of the partition is a palindrome. Return all possible palindrome partitioning of s. Example :… Read More »

January 1, 2017

Given a valid sentence without any spaces between the words and a dictionary of valid English words, find all possible ways to break the sentence… Read More »

December 14, 2016

Given an integer array of N elements, the task is to divide this array into K non-empty subsets such that the sum of elements in… Read More »

October 9, 2016

An expression will be given which can contain open and close parentheses and optionally some characters, No other operator will be there in string. We… Read More »

August 14, 2016

Given a path in the form of a rectangular matrix having few landmines arbitrarily placed (marked as 0), calculate length of the shortest safe route… Read More »

August 4, 2016

Given an M x N matrix, with a few hurdles arbitrarily placed, calculate the length of longest possible route possible from source to destination within… Read More »

July 6, 2016

Given a string, find out if string follows a given pattern or not without using any regular expressions. Examples: Input: string – GraphTreesGraph pattern -… Read More »

June 25, 2016

Given a positive integer, find maximum integer possible by doing at-most K swap operations on its digits. Examples: Input: M = 254, K = 1… Read More »

June 17, 2016

Given a square maze containing positive numbers, find all paths from a corner cell (any of the extreme four corners) to the middle cell. We… Read More »

May 1, 2016

Given a graph, a source vertex in the graph and a number k, find if there is a simple path (without any cycle) starting from… Read More »