[Solved] In how many different ways we can reach the end of the array arr[]={1,3,5,8,9}?

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

Answer: d
Explanation: 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.

Comments