Vidyalelo
Data Structure · Q156

Dynamic Programming in Data Structures

Programming · Data Structure · question 156

Q156

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?

A.
O(N)
B.
O(S)
Answer
C.
O(N2)
D.
O(S*N)

Answer: Option B

Solution

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