Top 50 Dynamic Programming Practice Problems

Top 50 Dynamic Programming Practice Problems

Dynamic Programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems, solving each of those subproblems just once, and storing their solutions using a memory-based data structure (array, map,etc). Each of the subproblem solutions is indexed in some way, typically based on the values of its input parameters, so as to facilitate its lookup. So the next time the same subproblem occurs, instead of recomputing its solution, one simply looks up the previously computed solution, thereby saving computation time. This technique of storing solutions to subproblems instead of recomputing them is called memoization.

Here’s brilliant explanation on concept of Dynamic Programming on Quora — Jonathan Paulson’s answer to How should I explain dynamic programming to a 4-year-old?

Please find below top 50 common data structure problems that can be solved using Dynamic programming

  1. Longest Common Subsequence | Introduction & LCS Length 最长的公共子序列
  2. Longest Common Subsequence | Finding all LCS — Techie Delight 找到所有的最长公共子序列
  3. Longest Common Substring problem — Techie Delight 最长公共子字符串
  4. Longest Palindromic Subsequence using Dynamic Programming
  5. Longest Repeated Subsequence Problem — Techie Delight 最长重复子序列问题
  6. Implement Diff Utility — Techie Delight
  7. Shortest Common Supersequence | Introduction & SCS Length
  8. Shortest Common Supersequence | Finding all SCS — Techie Delight
  9. Longest Increasing Subsequence using Dynamic Programming — Techie Delight
  10. Longest Bitonic Subsequence — Techie Delight
  11. Increasing Subsequence with Maximum Sum — Techie Delight
  12. The Levenshtein distance (Edit distance) problem — Techie Delight
  13. Find size of largest square sub-matrix of 1’s present in given binary matrix — Techie Delight
  14. Matrix Chain Multiplication using Dynamic Programming
  15. Find the minimum cost to reach last cell of the matrix from its first cell — Techie Delight
  16. Find longest sequence formed by adjacent numbers in the matrix — Techie Delight
  17. Count number of paths in a matrix with given cost to reach destination cell
  18. 0–1 Knapsack problem — Techie Delight
  19. Maximize the Value of an Expression — Techie Delight
  20. Partition problem | Dynamic Programming Solution — Techie Delight
  21. Subset Sum Problem — Techie Delight
  22. Minimum Sum Partition Problem — Techie Delight
  23. Find all N-digit binary strings without any consecutive 1’s — Techie Delight
  24. Rod Cutting Problem — Techie Delight
  25. Maximum Product Rod Cutting — Techie Delight
  26. Coin change-making problem (unlimited supply of coins) — Techie Delight
  27. Coin Change Problem (Total number of ways to get the denomination of coins) — Techie Delight
  28. Longest Alternating Subsequence Problem — Techie Delight
  29. Count number of times a pattern appears in given string as a subsequence
  30. Collect maximum points in a matrix by satisfying given constraints — Techie Delight
  31. Count total possible combinations of N-digit numbers in a mobile keypad — Techie Delight
  32. Find Optimal Cost to Construct Binary Search Tree — Techie Delight
  33. Word Break Problem | Dynamic Programming — Techie Delight
  34. Word Break Problem | Using Trie Data Structure — Techie Delight
  35. Total possible solutions to linear equation of k variables — Techie Delight
  36. Wildcard Pattern Matching — Techie Delight
  37. Find Probability that a Person is Alive after Taking N steps on an Island
  38. Calculate sum of all elements in a sub-matrix in constant time — Techie Delight
  39. Find Maximum Sum Submatrix in a given matrix — Techie Delight
  40. Find Maximum Sum Submatrix present in a given matrix — Techie Delight
  41. Find maximum sum of subsequence with no adjacent elements — Techie Delight
  42. Maximum Subarray Problem (Kadane’s algorithm) — Techie Delight
  43. Single-Source Shortest Paths — Bellman Ford Algorithm — Techie Delight
  44. All-Pairs Shortest Paths — Floyd Warshall Algorithm — Techie Delight
  45. Pots of Gold Game using Dynamic Programming — Techie Delight
  46. Find minimum cuts needed for palindromic partition of a string
  47. Maximum Length Snake Sequence — Techie Delight
  48. 3-Partition Problem — Techie Delight
  49. Calculate size of the largest plus of 1’s in binary matrix — Techie Delight
  50. Check if given string is interleaving of two other given strings

转载于:https://www.cnblogs.com/tuhooo/p/10881972.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值