Dynamic Programming In Data Structures - Study Mode
[#91] You are given a knapsack that can carry a maximum weight of 60. There are 4 items with weights {20, 30, 40, 70} and values {70, 80, 90, 200}. What is the maximum value of the items you can carry using the knapsack?
Correct Answer
(A) 160
[#92] Consider the following assembly line problem: time_to_reach[2][3] = {{17, 2, 7}, {19, 4, 9}}
time_spent[2][4] = {{6, 5, 15, 7}, {5, 10, 11, 4}}
entry_time[2] = {8, 10}
exit_time[2] = {10, 7}
num_of_stations = 4 For the optimal solution, which should be the starting assembly line?
Correct Answer
(B) Line 2
[#93] For every non-empty string, the length of the longest palindromic subsequence is at least one.
Correct Answer
(A) True
[#94] Consider the matrices P, Q, R and S which are 20 x 15, 15 x 30, 30 x 5 and 5 x 40 matrices respectively. What is the minimum number of multiplications required to multiply the four matrices?
Correct Answer
(C) 7750
[#95] There are 10 dice having 5 faces. The faces are numbered from 1 to 5. What is the number of ways in which a sum of 4 can be achieved?
Correct Answer
(A) 0