Dynamic Programming In Data Structures - Study Mode

[#166] What is a common strategy used in Dynamic Programming for solving problems?
Correct Answer

(B) Bottom-up or top-down approaches.

[#167] In the Dynamic Programming approach, what is a "state"?
Correct Answer

(C) A representation of a subproblem solution.

[#168] Given a 2D matrix, find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?
Correct Answer

(D) Brute force, Recursion, Dynamic programming

[#169] Suppose we find the 8th term using the recursive implementation. The arguments passed to the function calls will be as follows: fibonacci(8)
fibonacci(7) + fibonacci(6)
fibonacci(6) + fibonacci(5) + fibonacci(5) + fibonacci(4)
fibonacci(5) + fibonacci(4) + fibonacci(4) + fibonacci(3) + fibonacci(4)
+ fibonacci(3) + fibonacci(3) + fibonacci(2)
:
:
: Which property is shown by the above function calls?
Correct Answer

(C) Overlapping subproblems

[#170] Given a string, you have to find the minimum number of characters to be inserted in the string so that the string becomes a palindrome. Which of the following methods can be used to solve the problem?
Correct Answer

(D) Both recursion and dynamic programming