Data Structure Questions and Answers-Dynamic Programming

DOWNLOAD FREE PDF <<CLICK HERE>>

Data Structure Questions and Answers-Dynamic Programming

Congratulations - you have completed Data Structure Questions and Answers-Dynamic Programming.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%


Your answers are highlighted below.
Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Which of the following is/are property/properties of a dynamic programming problem?
A
Optimal substructure
B
Overlapping subproblems
C
Greedy approach
D
Both optimal substructure and overlapping subproblems
Question 1 Explanation: 
A problem that can be solved using dynamic programming possesses overlapping subproblems as well as optimal substructure properties.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
If an optimal solution can be created for a problem by constructing optimal solutions for its subproblems, the problem possesses ..... property.
A
Overlapping subproblems
B
Optimal substructure
C
Memoization
D
Greedy
Question 2 Explanation: 
Optimal substructure is the property in which an optimal solution is found for the problem by constructing optimal solutions for the subproblems.

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
If a problem can be broken into subproblems which are reused several times, the problem possesses ..... property.
A
Overlapping subproblems
B
Optimal substructure
C
Memoization
D
Greedy
Question 3 Explanation: 
Overlapping subproblems is the property in which value of a subproblem is used several times.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
If a problem can be solved by combining optimal solutions to non-overlapping problems, the strategy is called .....
A
Dynamic programming
B
Greedy
C
Divide and conquer
D
Recursion
Question 4 Explanation: 
In divide and conquer, the problem is divided into smaller non-overlapping subproblems and an optimal solution for each of the subproblems is found. The optimal solutions are then combined to get a global optimal solution. For example, mergesort uses divide and conquer strategy.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
When dynamic programming is applied to a problem, it takes far less time as compared to other methods that don't take advantage of overlapping subproblems.
A
True
B
False
Question 5 Explanation: 
Dynamic programming calculates the value of a subproblem only once, while other methods that don't take advantage of the overlapping subproblems property may calculate the value of the same subproblem several times. So, dynamic programming saves the time of recalculation and takes far less time as compared to other methods that don't take advantage of the overlapping subproblems property.

Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 5 questions to complete.

DOWNLOAD FREE PDF <<CLICK HERE>>