Frog Paths Without Three Consecutive Same Moves
A frog travels from A(0,0) to B(m,n). Each step is one unit up or one unit right, and the frog refuses to move three steps in the same direction consecutively. Compute the number of possible paths fro...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
