Question: A frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist

A frog is crossing a river. The river is divided into some number of units, and at each unit, there may

or may not exist a stone. The frog can jump on a stone, but it must not jump into the water. The frog

has to cross the river by taking minimum jumps.

1. You have to propose an algorithm which could solve this problem by using greedy approach.

2. After proposing the algorithm, you have to proof the legality and optimality of your

algorithm which you have proposed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!