I tend to agree with that. From what I read, Project Euler is more focussed on the underlying mathematics and is less coding-oriented per se. Of course, you need a combination of both. It is nice to see that there are others here who also like to solve such puzzles for fun. My wife thinks I'm mad for doing this.

Rotating the grid by 45° did help me see it as a tree-like structure. I started off with 1x1 grid then a 2x2 and a 3x3 grid but it was difficult to find a relationship between the grid size and the number of ways to get to the endpoint. I had to brush up on my math skills but I managed to get it solved.

I learned something today. Thanks, folks!

@Piet, could you elaborate on your suggestion? There should have been 4 balls, right? (i.e. two white ones and two red ones, for a 2x2 grid). How does this relate to a bigger grid? I'm curious and like to understand it.