## Dynamic Programming – Minimum Coin Change Problem

Objective: Given a amount ‘A’ and n coins, v1<v2<v3<………..<vn . Write a program to find out minimum numbers of coins required to make the change for the amount ‘A’. Example: Amount: 5 Coins []...

Skip to content# Category: Recursion

## Dynamic Programming – Minimum Coin Change Problem

## Introduction To Dynamic Programming – Fibonacci Series

## Find the Deepest Left Node in a Binary Tree.

## Find the Max element in a Given Binary Tree

## Populate Next Siblings Pointers in a Given Binary Tree OR Populate Next Right Pointers in Each Node

## Check If One Binary is Mirror Tree of another Binary Tree.

## Print All Paths From Root In a Binary Tree Whose Sum is Equal to a Given Number

## Diameter Of a Binary Tree

## Find the Deepest Node in a Binary Tree.

## Find the Height of a tree without Recursion

## Print All The Full Nodes in a Binary Tree

## Print All Possible Valid Combinations Of Parenthesis of Given ‘N’

## Towers Of Hanoi

## Generate All Strings of n bits.

## Euclidean algorithm – Greatest Common Divisor(GCD)

@tutorialhorizon

Objective: Given a amount ‘A’ and n coins, v1<v2<v3<………..<vn . Write a program to find out minimum numbers of coins required to make the change for the amount ‘A’. Example: Amount: 5 Coins []...

What is Dynamic Programming: Dynamic programming is a technique to solve the recursive problems in more efficient manner. Many times in recursion we solve the sub-problems repeatedly. In dynamic programming we store the solution...

Objective: – Given a binary tree, Find the deepest left node in it. Approach: This approach is very similar to “Find the Deepest Node in a Binary Tree” with little modification. Take two global...

Objective: – Given a binary tree , Find the max element in it. Example: Approach: Use Recursion. Max will the Max(root, max element in the left subtree, max element in right subtree) Recursively solve for the...

Objective: – Given a binary tree with three pointers left, right and nextSibling). Write the program to provide the nextsibling pointers. This problem can also be referred as “Populating Next Right Pointers in Each...

Objective: – Given two binary trees check if they are mirror image of each other. Example: Approach:

Objective: – Given a binary tree and X, write an algorithm to Print all the paths starting from root so that sum of all the nodes in path equals to a given number. Example:

Objective: – Given a binary tree, write an algorithm to find the diameter of the tree. What is Diameter Of a Tree: Diameter of tree is defined as A longest path or route between...

Objective: – Given a binary tree, write an algorithm to Find the deepest node in it. Approach: Take two global variable as “deepestlevel” and “value“. starting with level=0, Do the inorder traversal and whenever...

Objective: – Find the Height of a tree without Recursion. In our earlier post “Height of tree” we had used recursion to find it. In this post we will see how to find it...

Objective: Given a binary tree, print all nodes will are full nodes. Full Nodes: Nodes Which has both the children, left and right are called Full Nodes Approach: quite simple Solution. Do the any...

Objective: – Given “n”, generate all valid parenthesis strings of length “2n”. Example: Given n=2 Output: (()) ()() Approach:

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The objective of the puzzle...

Objective: – Generate All Strings of n bits, consider A[0..n-1] is an array of size n. Example : n = 3 Output: [0, 0, 0] [1, 0, 0] [0, 1, 0] [1, 1, 0]...

The greatest common divisor (GCD) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the...

%d bloggers like this: