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…
Give n*n matrix find minimum cost required to reach from source to destination. Lets consider source is Array [0][0] and destination is Array [n-1][ n-1]…
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…
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…
Find nth fibonacci number. The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next…
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…
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…
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…
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 =…
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…