Sail E0 Webinar
Question
Consider the following code:#includeint get_min(int a, int b){     if(a
Options:
A .  t2[i] = get_min(t2[i-1]+spent[1][i], t1[i-1]+reach[0][i-1]+spent[1][i])
B .  t2[i] = get_min(t2[i-1]+spent[1][i], t1[i-1]+spent[1][i])
C .  t2[i] = get_min(t2[i-1]+spent[1][i], t1[i-1]+reach[0][i-1])
D .  none of the mentioned
Answer: Option A


The line t2[i] = get_min(t2[i-1]+spent[1][i], t1[i-1]+reach[0][i-1]+spent[1][i]) should be added to complete the above code.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers