1.

Consider the following dynamic programming implementation of the rod cutting problem. Which line will complete the Below code?

A. Prices[j-1] + max_val[tmp_idx].
B. Prices[j] + max_val[tmp_idx].
C. Prices[j-1] + max_val[tmp_idx 1].
D. Prices[j] + max_val[tmp_idx 1].
Answer» B. Prices[j] + max_val[tmp_idx].


Discussion

No Comment Found