Algorithm for finding all paths in a NxN grid
Posted
by
Periastron
on Stack Overflow
See other posts from Stack Overflow
or by Periastron
Published on 2012-02-02T00:58:52Z
Indexed on
2012/11/06
11:02 UTC
Read the original article
Hit count: 147
Imagine a robot sitting on the upper left hand corner of an NxN grid. The robot can only move in two directions: right and down. How many possible paths are there for the robot?
I could find solution to this problem on Google, but I am not very clear with the explanations. I am trying to clearly understand the logic on how to solve this and implement in Java. Any help is appreciated.
Update: This is an interview question. For now, I am trying to reach the bottom-right end and print the possible paths.
© Stack Overflow or respective owner