DIY: Frog Jump

Solve the interview question "Frog Jump in this lesson.

Problem statement

A river is divided into units. At each unit, there may or may not be a stone. A frog has to cross the river. It can jump on a stone, but it must not jump into the water.

You are given ...

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.