0

Jumping Frog problem

Two frogs are sitting at bottom of a flight of steps and debating in how many ways can they jump up the stairs. They can jump one, two or three steps at a time. For example they can cover the 10 steps by jumping or or other suitable combinations. Their mathematics is not very strong (being frogs) and they approach you for help. Develop an efficient Python function that provides a general solution (not only for but for general steps). Note that is distinct from and likewise and that we only want to count the number of solutions and not report the solutions. Perform the timing analysis of your solution.

23rd Nov 2022, 3:58 AM
Ankit Meena
Ankit Meena - avatar
1 Odpowiedź
+ 2
Attempts?
23rd Nov 2022, 4:26 AM
A͢J
A͢J - avatar