Question 1

A frog has to cross the river from one end to another end. river has stones in between randomly where frog can jump. frog can’t jump into the river. problem is that will frog ever reach other end with following conditions?

1. frog allow to do same jump as previous jump. or

2. frog allow to jump 1 more as previous jump. or

3. frog allow to jump 1 less as previous jump.

consider river as Boolean Array. Stone is a element in array where value is true .

[advanced_iframe securitykey=”undefined” src=”” width=”100%” height=”600″]