1.

You are given an array of elements where each array element represents the MAXIMUM number of jumps that can be made in the forward direction from that element. You have to find the minimum number of jumps that are required to reach the end of the array. Which of these methods can be used to solve the problem?(a) Dynamic Programming(b) Greedy Algorithm(c) Recursion(d) Recursion and Dynamic ProgrammingThis question was addressed to me in a national level competition.The above asked question is from Minimum Number of Jumps in section Dynamic Programming of Data Structures & Algorithms II

Answer»

Correct choice is (d) RECURSION and Dynamic PROGRAMMING

Easy explanation - Both recursion and dynamic programming can be used to SOLVE MINIMUM number of jumps problem.



Discussion

No Comment Found

Related InterviewSolutions