## Pots of Gold Game – Dynamic Programming

Two-player X and Y are playing Pots of Gold Game where pots of gold arranged in a  line, each containing some gold coins. Both players…

## Minimum cost to reach destination – Dynamic Programming

Give n*n matrix find minimum cost required to reach from source to destination. Lets consider source is Array  and destination is Array [n-1][ n-1]…

## Edit Distance Problem (Levenshtein distance) – Dynamic Programming

There are two strings source and destination. The goal of the problem is to convert source to destination by applying minimum edit operations on string…

## Longest Increasing Subsequence Problem – Dynamic Programming

Given an array find a subsequence of a given array in which the array’s elements are in sorted order, lowest to highest, and in which…

## Fibonacci Numbers Problem – Dynamic Programming

Find nth fibonacci number. The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next…

## Rod Cutting Problem – Dynamic Programming

Given a rod of size n and values of various sizes of rod. The problem is to cut the rod in such a way that…

## Subset Sum Problem – Dynamic Programming

Given a set of positive integers and a value sum write program to determine if there is a subset of the given set with sum…

## Knapsack Problem

The knapsack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of…

## Maximum sub array problem – Kadane’s Algorithm

Given a sequence of n real numbers A(1) … A(n), program to find a contiguous subarray with the largest sum For example, var arr =…

## Frog Jump Problem

Problem A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a…