ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which line will complete the ABOVE code?
prices[j-1] + max_val[tmp_idx]
prices[j] + max_val[tmp_idx]
prices[j-1] + max_val[tmp_idx - 1]
prices[j] + max_val[tmp_idx - 1]
Correct Answer: A — prices[j-1] + max_val[tmp_idx]
prices[j-1] + max_val[tmp_idx] completes the code.