Q. In dynamic programming, what does the term 'overlapping subproblems' mean?
-
A.
Subproblems that can be solved independently
-
B.
Subproblems that share sub-subproblems
-
C.
Subproblems that are never reused
-
D.
Subproblems that require sorting
Solution
Overlapping subproblems refer to subproblems that share sub-subproblems, allowing for reuse of results.
Correct Answer:
B
— Subproblems that share sub-subproblems
Learn More →
Q. In dynamic programming, what is the primary purpose of the 'table' or 'array' used?
-
A.
To store intermediate results
-
B.
To sort data
-
C.
To track function calls
-
D.
To manage memory allocation
Solution
The primary purpose of the table or array in dynamic programming is to store intermediate results to avoid redundant calculations.
Correct Answer:
A
— To store intermediate results
Learn More →
Q. Which dynamic programming approach is used to solve the problem of finding the minimum edit distance between two strings?
-
A.
Bottom-up
-
B.
Top-down
-
C.
Greedy
-
D.
Brute force
Solution
The minimum edit distance problem is typically solved using a top-down dynamic programming approach.
Correct Answer:
B
— Top-down
Learn More →
Showing 1 to 3 of 3 (1 Pages)