Ask Mentors Anything

Get your questions/doubts directly answered by our mentors. Let's get started.

Mentee Question

Asked by Suriya

How to get ready to solve complex program in a short period of time like dynamic programming

Mentors Answer

Answered By Mentor Priyansha Sharma

Hi Suriya,

  1. If you want to learn DP in short period of time then watch Aditya verma DP series playlist : https://www.youtube.com/watch?v=nqowUJzG-iM&list=PL_z_8CaSLPWekqhdCPmFohncHwz8TY2Go
  2. Start solving a DP problem using recursion 1st.Then come up with memoization solution of above recursive solution. Then build dp solution with the help of memoization solution.
  3. The more practice you do on DP problems, more quickly you will be able to identify the pattern.

Hope my answer helps you. if you have any other doubt, please reach out to me. 


Answered By Mentor Rahul Bhargav P

DP is not a one-size-fits-all technique, and it requires practice to develop the ability to identify the underlying DP patterns. With a strategic approach, coding interview prep for DP problems shouldn’t take more than a few weeks.

There are 5 different patterns of DP problems, and you need to thoroughly understand each of them.

0/1 Knapsack

Unbounded Knapsack

Recursive Numbers

Palindromic Subsequence

Longest Common Substring


Once you learn these patterns, you will be equipped with the necessary skills to identify the distinguishing features of a new problem that can help you correctly identify the underlying pattern.



Top Performing Mentors This Week 🔥

Loading...

400+

Book a FREE Trial with any mentor of your choice

Book a FREE Trial