Dynamic Programming In Data Structures - Study Mode
[#96] What is the space complexity of Kadane's algorithm?
Correct Answer
(A) O(1)
[#97] For which of the following inputs would Kadane's algorithm produce the INCORRECT output?
Correct Answer
(D) {-4,-3,-2,-1}
[#98] Which of the following is/are property/properties of a dynamic programming problem?
Correct Answer
(D) Both optimal substructure and overlapping subproblems
[#99] What is the space complexity of the divide and conquer algorithm used to find the maximum sub-array sum?
Correct Answer
(B) O(1)
[#100] Suppose you are given infinite coins of N denominations v1, v2, v3, ....., vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. What is the space complexity of a dynamic programming implementation used to solve the coin change problem?
Correct Answer
(B) O(S)