Dynamic Programming - Typical Problems - Typical Problems - Higher Difficulty Problems

Download Q&A
Q. In the dynamic programming approach to the coin change problem, what does the dp array represent?
  • A. Number of coins used
  • B. Minimum number of coins for each amount
  • C. Total value of coins
  • D. Maximum number of coins
Q. In the dynamic programming solution for the longest common subsequence, what does the dp[i][j] cell represent?
  • A. Length of LCS for first i characters of string A and first j characters of string B
  • B. Total number of subsequences
  • C. Characters in the LCS
  • D. Length of the strings A and B
Q. What is the optimal substructure property in dynamic programming?
  • A. The problem can be divided into smaller subproblems
  • B. The solution can be constructed from optimal solutions of its subproblems
  • C. The problem has overlapping subproblems
  • D. All of the above
Q. Which dynamic programming technique is used to solve the problem of finding the maximum sum of non-adjacent elements?
  • A. Memoization
  • B. Tabulation
  • C. Greedy
  • D. Backtracking
Q. Which of the following is NOT a typical problem solved by dynamic programming?
  • A. Traveling Salesman Problem
  • B. Matrix Chain Multiplication
  • C. Depth First Search
  • D. Rod Cutting Problem
Showing 1 to 5 of 5 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely