Vidyalelo
Data Structure · Q102

Dynamic Programming in Data Structures

Programming · Data Structure · question 102

Q102

Consider the following code snippet: 1. int sum[len], idx; 2. sum[0] = arr[0]; 3. for(idx = 1; idx mx) 8. mx =sum[idx]; 9. return mx; Which method is used by line 4 of the above code snippet?

A.
Divide and conquer
B.
Recursion
C.
Both memoization and divide and conquer
D.
Memoization
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board