India’s Best Job Seekers and Training Platform Forums Data Structure A frog has to cross the river from one end to another end…

  • A frog has to cross the river from one end to another end…

     Akash  updated 11 months, 3 weeks ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    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 .

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close