1.

For a given array, there can be multiple ways to reach the end of the array using minimum number of jumps.(a) True(b) FalseThe question was posed to me in an online interview.My enquiry is from Minimum Number of Jumps topic in division Dynamic Programming of Data Structures & Algorithms II

Answer»

Right answer is (a) True

Easy explanation - CONSIDER the array {1,2,3,4,5}. It is possible to REACH the end in the following ways: {1 -> 2 -> 3 -> 5} or {1 -> 2 -> 4 -> 5}.

In both the cases the NUMBER of jumps is 3, which is minimum. Hence, it is possible to reach the end of the array in MULTIPLE ways using minimum number of jumps.



Discussion

No Comment Found

Related InterviewSolutions