Longest Common Subsequence using Dynamic Programming

This is a C++ Program that Solves Longest common subsequence using Dynamic Programming technique. Problem Description There are 2 strings str1 and str2. Find the length of the longest subsequence common to both str1 and str2. Problem Solution This problem can be solved using dynamic programming. First we will calculate the length of longest common … Read more

advertisement

Matrix Chain Multiplication using Dynamic Programming

This is a C++ Program that Solves Matrix Chain Multiplication Problem using Dynamic Programming technique. Problem Description Given order of n matrices, find the minimum multiplication operations required for multiply n matrices. Required condition for multiplying two matrices If we have two matrix A of order a*b and matrix B of order c*d. In the … Read more

advertisement

Optimal Strategy for a Game using Dynamic Programming

This is a C++ Program that Solves Optimal Game Strategy Problem using Dynamic Programming technique. Problem Description This is a two player game. There are even number of coins arranged in a row. There will be alternate turns. In each turn, a player can either select the first coin in the row or the last … Read more

advertisement

Edit Distance Problem – Dynamic Programming Solutions

This is a C++ Program that Solves Edit Distance Problem using Dynamic Programming technique. Problem Description There are two strings src and dest. The goal of the problem is to convert src to dest by applying minimum edit operations on string str1. The edit operations are following – 1) insert a character 2) delete a … Read more

advertisement

Dynamic Programming Solutions – Balanced Partition Problem

This is a C++ Program that Solves Balanced Partition Problem using Dynamic Programming technique. Problem Description You are given a set of integers. Determine whether or not this set can be divided into two subsets such that the sum of elements in each subset is equal. Problem Solution First calculate the sum of all the … Read more

advertisement

Assembly Line Scheduling using Dynamic Programming

This is a C++ Program that Solves Assembly Line Scheduling Problem using Dynamic Programming technique. Problem Description There are two assembly lines. Each assembly line has n stations. Every station has some dedicated job that needs to done. For a station number i, you can get the job done on station number i of any … Read more

advertisement

Weighted Activity Selection using Dynamic Programming

This is a C++ Program that Solves Weighted Activity Selection problem using Dynamic Programming technique. Problem Description There are N jobs. Each job has a start time, end time and value. You have to attain the maximum value by performing these jobs. However, you can do only one job at a time. Problem Solution We … Read more

advertisement

Treats for the Cows – Dynamic Programming Solutions

This is a C++ Program that Solves Treats for the cows Problem using Dynamic Programming technique. Problem Description FJ has purchased N (1

advertisement

Integer Knapsack Problem – Dynamic Programming Solutions

This is a C++ Program that Solves Integer Knapsack Problem using Dynamic Programming technique. Problem Description Given weights and values of n items, put these items in a knapsack of capacity M, to get the maximum total value in the knapsack. Note that- there are infinite instances of each item available. So, any item can … Read more

advertisement

0-1 Knapsack Problem using Dynamic Programming

This is a C++ Program that Solves 0 1 Knapsack Problem using Dynamic Programming technique. Problem Description Given weights and values of n items, put these items in a knapsack of capacity M to get the maximum total value in the knapsack. Note that, you can select items, the sum of whose weight is less … 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.