Sail E0 Webinar
Question
Consider the following dynamic programming implementation of the minimum jumps problem:#include#includeint min_jump(int *arr, int len){     int j, idx, jumps[len];     jumps[len - 1] = 0;     for(idx = len - 2; idx >= 0; idx--)     {   int tmp_min = INT_MAX;   for(j = 1; j
Options:
A .  for(j = 1; j < arr[idx] + len; j++)
B .  for(j = 0; j < arr[idx] "“ len; j++)
C .  for(j = idx + 1; j < len && j
D .  None of the mentioned
Answer: Option D


None of the above mentioned "for loops can be used instead of the inner for loop. Note, for(j = idx + 1; j < len && j


Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers