02.A Frog That Won't Repeat Itself
★★★combinatoricsSIG
A frog travels from (0,0) to (4,6), moving one unit right or one unit up at each step. It refuses to make three consecutive steps in the same direction. How many distinct paths can it take?
Sign in to submit an answer and track it toward your stats.
Sign inHint
Count with a recursion over position, plus the direction of the last step and how many times it has already been repeated.
Want timed drills, mental math, and a market-making game too? Try the full practice suite →