×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Dynamic Programming (DP)

Dynamic Programming is an algorithmic technique in which the key idea is to store the values of smaller problems such that in case, the value is required again, it will return the value instead of recomputing. This works in problems which can be broken into smaller problems and smaller problems are encountered multiple times. When applicable, dynamic programming can reduced the time complexity greatly

Algorithms

Maximum Profit by Buying and Selling a Share at Most k Times

In this article at OpenGenus, we will solve the problem of getting maximum profit by buying and selling a share at most k times.

Manraj Singh Manraj Singh
Graph Algorithms

Longest Increasing Path in a Matrix [4 approaches explained]

This problem involves navigating a 2D matrix to find the longest path such that each element in the path is strictly greater than the previous one.

Kavya Mothukuri
Dynamic Programming (DP)

Interleaving String [Solved]

The Interleaving Strings problem is a classical dynamic programming problem that involves whether a string can be formed by interleaving two strings. In this article, we'll explore this problem in depth and provide a C++ implementation using dynamic programming.

S Sudharshan
Algorithms

Greedy Algorithm vs Dynamic programming

In this article, we will discuss greedy methods vs dynamic programming. Both of them are used for optimization of a given problem. Optimization of a problem is finding the best solution from a set of solutions.

Krishna Nikhil Mehta
Algorithms

3D Kadane's algorithm

In this article we are going to learn about what kadane's algorithm is and will also see how to apply it on 3-dimensional arrays to generate a sub-cube with maximum sum of its elements (3D Kadane's algorithm).

Rahul Kumar Yadav
binary search

Egg Dropping Puzzle

In this article, we have explored the Egg Dropping Puzzle in depth with various algorithms including Combinatorics and Dynamic Programming.

Gabriel
Dynamic Programming (DP)

Longest Geometric Progression

In this article, we have explained how to solve the problem of Longest Geometric Progression efficiently using Dynamic Programming. It involves the use of Map data structure in implementation which is different from other standard problems.

Ue Kiao, PhD Ue Kiao, PhD
Dynamic Programming (DP)

Longest Increasing Subsequence [3 techniques]

In this article, we have explained the problem of Longest Increasing Subsequence along with 3 techniques (Brute force, Binary Search, Dynamic Programming).

Mudit Garg
Dynamic Programming (DP)

Word Wrap Problem

In this article, we have solved the Word Wrap Problem in depth. This involves Dynamic Programming Concepts.

Purvak Baliyan
Compiler Design

Dynamic programming for Code generation

Dynamic programming not only applies to a broad class of register machines but its application results in the generation of optimal code that runs in linear time.

Erick Lumunge
Algorithms

Maximum size square submatrix with all 1s

In this article, we have explored various ways to solve the problem of finding maximum size square submatrix with all 1s. This can be solved using Dynamic Programming.

Kartheesh Reddy Koripelli
Dynamic Programming (DP)

Dynamic Programming on Trees

In this article, we have explored the idea of Dynamic Programming on Trees in depth and presented some practice problems.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Algorithms

Jump Game II: Minimum number of jumps to last index

In this post, we will explore various ways to solve the minimum number of jumps to last index (Jump Game II) problem. In this, we will use ideas of Dynamic Programming and Greedy Algorithm.

Erick Lumunge
Algorithms

Shortest Superstring problem

In this article, we have explained three approaches to solve the Shortest Superstring problem. This involve concepts like DFS and Dynamic Programming.

Piyush Agrawal Piyush Agrawal
Algorithms

Longest Increasing Consecutive Subsequence

We have to find the Longest Increasing Consecutive Subsequence in N elements. We can solve this problem efficiently using Dynamic Programming in O(N) time.

Vikram Shishupalsingh Bais Vikram Shishupalsingh Bais
Algorithms

Karp's Minimum Mean Cycle Algorithm

We have presented Karp's Minimum Mean Cycle Algorithm along with C++ Implementation. Karp's theorem and Complexity Analysis.

Naveen Singla
Dynamic Programming (DP)

List of 100+ Dynamic Programming Problems

This is the List of 100+ Dynamic Programming Problems along with different types of DP problems such as Mathematical DP, Combination DP, String DP, Tree DP, Standard DP and Advanced DP optimizations.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Algorithms

How to approach Dynamic Programming problems? (with example)

We have explained How to approach a Dynamic Programming problem with an example. The approach depends on the constraints of the problem at hand.

Sumit Kumar
Algorithms

Number of expressions that evaluate to value K

In this problem, we have to form expressions using + and - and find the number of expressions that evaluate to K. This can be solved efficiently using Dynamic Programming and is an extension of Count Subset Problem.

Rashmitha
String Algorithms

Number of palindromic substrings in a string

A string is a palindrome when it reads the same backward as forward and a substring is a contiguous sequence of characters within the string. We have discussed multiple approaches to find the number of palindromic substrings in a given string.

Shreya Shah Shreya Shah
Algorithms

Minimum number of nodes to be removed such that no subtree has more than K nodes

The article contains editorial + implementation for Finding minimum number of nodes to be removed such that no sub tree has more than K nodes.

Vikram Shishupalsingh Bais Vikram Shishupalsingh Bais
Algorithms

Number of substrings with exactly k distinct characters

In this problem, we are given a string and our job is to count the total number of substrings of the given string that contains exactly k distinct characters. We have explored 3 approaches to solve this.

Raghavendra Achar C
Algorithms

Longest Alternating Subsequence

Given an array, find the length of the longest alternating subsequence. We solve this using two approaches: Dynamic Programming and Efficient Approach.

Aditya Kumar Saroj
Algorithms

Find length of the longest Fibonacci subsequence

We have a strictly increasing array of positive integers. Our task is to find the length of the longest Fibonacci subsequence possible. We will solve this using Brute force and Dynamic Programming.

Raghavendra Achar C
Algorithms

Coin Change Problem

Coin change problem is very similar to unbounded knapsack problem which can be solved easily and efficiently by using Dynamic Programming. General task is to find maximum number of ways to add the coins from the array for given amount.

Renuka Ashok Jadhav
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship