Frog Paths Without Three Consecutive Same Moves
A frog walks from (0,0) to (n,n) using unit up or right steps, and may not make three consecutive moves in the same direction. Given n (original problem n=6, 1<=n<=30), output the number of valid path...
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:
