Double Helix Problem – Dynamic Programming Solutions

This is a C++ Program that Solves Double Helix Problem using Dynamic Programming technique. Problem Description Two finite, strictly increasing, integer sequences are given. Any common integer between the two sequences constitute an intersection point. You can ‘walk” over these two sequences in the following way: 1. You may start at the beginning of any … Read more

advertisement

Alice Kindergarten Candies Problem using Dynamic Programming

This is a C++ Program that Solves Alice Kindergarden Candies Problem using Dynamic Programming method. Problem Description Alice is a kindergarden teacher. She wants to give some candies to the children in her class. All the children sit in a line ( their positions are fixed), and each of them has a rating score according … Read more

advertisement

Triangle Problem using Dynamic Programming

This is a C++ Program that Solves Forming Triangles Problem – Catalan Numbers using Dynamic Programming technique. Problem Description In how many ways a plane convex polygon of n sides can be divided into triangles by diagonals? Problem Solution This problem can be solved using catalan numbers. Catalan numbers forms a sequence of natural numbers … Read more

advertisement

Newspaper Headline Problem using Dynamic Programming

This is a C++ Program that Solves the Newspaper Headline Problem using Dynamic Programming technique. Problem Description A newspaper is published in Walrusland. Its heading is s1, it consists of lowercase Latin letters. Fangy the little walrus wants to buy several such newspapers, cut out their headings, glue them one to another in order to … Read more

advertisement

Parentheses Expressions Problem – Catalan Numbers

This is a C++ Program that Solves Parentheses Expressions Problem – Catalan numbers using Dynamic Programming technique. Problem Description How many different strings are possible containing n pairs of parentheses which are correctly matched? Problem Solution This problem can be solved using catalan numbers. Catalan numbers forms a sequence of natural numbers based on a … Read more

advertisement

Binary Trees with N Keys Problem – Dynamic Programming Solutions

This is a C++ Program that Solves Number of Binary Trees Problem – Catalan Numbers using Dynamic Programming technique. Problem Description How many structurally different binary trees are possible with n nodes? Problem Solution In the above binary tree representations, * indicates a node of tree and / and \ indicates a left and right … Read more

advertisement

Fibonacci Series using Dynamic Programming

This is a C++ Program that Solves Fibonacci Numbers Problem using Dynamic Programming technique. Problem Description Find nth fibonacci number The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next number is found by adding up the two numbers before it. Let F[i] be … Read more

advertisement

Coin Change Problem using Dynamic Programming

This is a C++ Program that Solves Coin Change Problem using Dynamic Programming technique. Problem Description There are infinite number of coins of x different values. These values are given. Using these coins, you have to make change for Rs. N. In how many ways, you can make this change? Note that there are infinite … Read more

advertisement

Binomial Coefficient using Dynamic Programming

This is a C++ Program that Solves Binomial Coefficients Problem using Dynamic Programming technique. Problem Description Given two values n and k, find the number of ways of chosing k objects from among n objects disregarding order. The problem can be rephrased as finding the binomail coefficient C(n,k). Problem Solution The problem is to find … Read more

advertisement

Rod Cutting Problem using Dynamic Programming

This is a C++ Program that Solves Rod Cutting Problem using Dynamic Programming technique. Problem Description 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 the sum of values of the pieces is maximum. Problem Solution The problem can … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.