## Dynamic Programming – Coin Change Problem

Objective: Given a set of coins and amount, Write an algorithm to find out how many ways we can make the change of the amount using the coins given. This is another problem in...

Skip to content# Category: Recursion

## Dynamic Programming – Coin Change Problem

## All N Length Strings from Given String of Length K

## Generate Well Ordered Passwords of a Given Length K

## Print All N Length Strings from Given Number K

## Print All Possible Subsets with Sum equal to a given Number

## Dynamic Programming – Subset Sum Problem

## The Word Break Problem

## Backtracking – Knight’s Tour Problem

## Backtracking – Search a Word In a Matrix

## Backtracking – N Queens Problem – Better Solution

## Backtracking – N Queens Problem

## Backtracking – Rat In A Maze Puzzle

## Backtracking – SUDOKU Solver

## Introduction To Backtracking Programming

## Dynamic Programming – Stairs Climbing Puzzle

@tutorialhorizon

Objective: Given a set of coins and amount, Write an algorithm to find out how many ways we can make the change of the amount using the coins given. This is another problem in...

Objective: Print All N Length Strings from Given String of Length K where characters can appear multiple time. Example: String k = “ALGO” N=2 Result: AA LA GA OA AL LL GL OL AG...

Objective: Generate Well Ordered Passwords of a Given Length K. Well ordered means that digits should be in increasing order in every generated password. Example: K = 7 1234567 1234568 1234569 1234578 1234579 1234589...

Objective: Given Number K, Print all the strings of N length. Example: N = 2, K = 3 [1, 1] [2, 1] [3, 1] [1, 2] [2, 2] [3, 2] [1, 3] [2, 3]...

Objective: Given a number N, Write an algorithm to print all possible subsets with Sum equal to N This question has been asked in the Google for software engineer position. Example: N=4 1111 112...

Objective: Given a set of positive integers, and a value sum S, find out if there exist a subset in array whose sum is equal to given sum S. Example: int[] A = {...

Objective : Given an string and a dictionary of words, find out if the input string can be broken into a space-separated sequence of one or more dictionary words. Example: dictionary = [“I” ,...

Objective : A knight’s tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is...

Objective : Given a 2D matrix of characters. Check whether the word exist in the matrix or not. If it exists then print its path. All movements are allowed (right, left, up, down and...

Objective : In chess, a queen can move as far as she pleases, horizontally, vertically, or diagonally. A chess board has 8 rows and 8 columns. The standard 8 by 8 Queen’s problem asks...

Objective : In chess, a queen can move as far as she pleases, horizontally, vertically, or diagonally. A chess board has 8 rows and 8 columns. The standard 8 by 8 Queen’s problem asks...

Given a maze, NxN matrix. A rat has to find a path from source to destination. maze[0][0] (left top corner)is the source and maze[N-1][N-1](right bottom corner) is destination. There are few cells which are...

Given a sudoku problem or partially filled sudoku, write a program to solve the sudoku. What is Sudoku: Sudoku is a puzzle where a partially completed grid is given and objective is to fill...

What is Backtracking Programming?? Recursion is the key in backtracking programming. As the name suggests we backtrack to find the solution. We start with one possible move out of many available moves and try...

Objective: A child is climbing up a staircase with n steps, and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways...

%d bloggers like this: