[CareerCup] 9.2 Robot Moving 机器人移动 - Grandyang - 博客园
[CareerCup] 9.2 Robot Moving 机器人移动
9.2 Imagine a robot sitting on the upper left corner of an X by Y grid. The robot can only move in two directions: right and down. How many possible paths are there for the robot to go from (0,0) to (X,Y)?
FOLLOW UP
Imagine certain spots are "off limits," such that the robot cannot step on them. Design an algorithm to find a path for the robot from the top left to the bottom right.
Read full article from [CareerCup] 9.2 Robot Moving 机器人移动 - Grandyang - 博客园
No comments:
Post a Comment