- 0of 0 votes
There is a river and there are n number of steps between two banks of the river to cross the river.- alpeshvesuwala
A frog wants to cross the river with the condition that he can jump max one step. Find the number of ways he can cross the river?
For e.g. if there are 3 steps in between, frog can go from paths: _123_, _2_, _13_ so there are 3 different ways frog can cross the river (in the example _ is two ends of the river)
| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer