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…
Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. It consists of three rods and several disks of different…
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…
Given an array write C# program to find the sum of all the possible sub-arrays. For.e.g. int [] a = {4, 2, 1}; Output: Possible…
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…