+1 vote
in Data Structures & Algorithms I by (110k points)
In how many different ways we can reach the end of the array arr[]={1,3,5,8,9}?

(a) 1

(b) 2

(c) 3

(d) 4

Asked question is from Number of Jumps to Reach End-array Operation topic in portion Arrays Types of Data Structures & Algorithms I

The question was asked in homework.

1 Answer

+1 vote
by (408k points)
selected by
Best answer
The correct answer is (d) 4

The best I can explain: There are 4 possible ways in which we can reach the end of the array. The possible paths are – 1->3->5->8->9, 1->3->5->9, 1->3->8->9, 1->3->9.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.