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
Get step-by-step solutions from verified subject matter experts
