Froggy's River Hop

MediumLogic PuzzlesDynamic Programming

Help Froggy cross the river by finding all possible safe paths! A fun introduction to dynamic programming.

The challenge

Froggy wants to cross a river with {leaves} lily pads. Some pads are broken! Froggy can only jump 1 or 2 pads at a time. How many different ways can Froggy reach the last lily pad?