Q. In a dynamic programming approach, what is the primary technique used to optimize recursive solutions?
A.
Memoization
B.
Backtracking
C.
Greedy Method
D.
Divide and Conquer
Show solution
Solution
Memoization is the technique used in dynamic programming to store the results of expensive function calls and reuse them when the same inputs occur again.
Correct Answer:
A
— Memoization
Learn More →
Q. In the context of dynamic programming, what does 'tabulation' refer to?
A.
Storing results in a table
B.
Recursive function calls
C.
Using a stack
D.
Sorting data
Show solution
Solution
Tabulation refers to the method of storing results in a table (array) to avoid redundant calculations in dynamic programming.
Correct Answer:
A
— Storing results in a table
Learn More →
Q. What is the main advantage of using dynamic programming over naive recursion?
A.
Simplicity
B.
Lower time complexity
C.
Easier to implement
D.
More memory usage
Show solution
Solution
The main advantage of using dynamic programming over naive recursion is the lower time complexity due to the avoidance of redundant calculations.
Correct Answer:
B
— Lower time complexity
Learn More →
Q. Which of the following dynamic programming problems can be solved using a bottom-up approach?
A.
Longest Common Subsequence
B.
Fibonacci Sequence
C.
Matrix Chain Multiplication
D.
All of the above
Show solution
Solution
All of the listed problems can be solved using a bottom-up approach in dynamic programming.
Correct Answer:
D
— All of the above
Learn More →
Showing 1 to 4 of 4 (1 Pages)