NTA UGC NET Aug 2024 Paper-2
April 13, 2025NTA UGC NET Aug 2024 Paper-2
April 14, 2025NTA UGC NET Aug 2024 Paper-2
| Question 27 |
Arrange the following steps in the correct order to solve the Knapsack problem using Dynamic
Programming.
(A) Define the base case when the capacity is zero (0) or no items are left to consider
(B) Compute the maximum value that can be obtained using items up to the i-th item and a
knapsack capacity of 0
(C) Identify subproblems and their dependencies based on items weights and values
(D) Initialize a table to store results of subproblems
(E) Iterate through each item and each possible Capacity to fill the table
Choose the correct answer from the options given below :
Programming.
(A) Define the base case when the capacity is zero (0) or no items are left to consider
(B) Compute the maximum value that can be obtained using items up to the i-th item and a
knapsack capacity of 0
(C) Identify subproblems and their dependencies based on items weights and values
(D) Initialize a table to store results of subproblems
(E) Iterate through each item and each possible Capacity to fill the table
Choose the correct answer from the options given below :
| (C),(D),(A),(E),(B) | |
| (D),(C),(A),(E),(B)
| |
| (A),(C),(D),(E),(B)
| |
| (D),(A),(C),(E),(B) |
Correct Answer: C
