Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

Algorithms | Dynamic Programming | Question 7

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In the above question, which entry of the array X, if TRUE, implies that there is a subset whose elements sum to W?


X[1, W]


X[n ,0]


X[n, W]


X[n -1, n]

Answer: (C)


If we get the entry X[n, W] as true then there is a subset of {a1, a2, .. an} that has sum as W. 

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads