邢城 发表于 2013-7-30 17:28:53

[google面试题]Given 
an 
n
 x
 n
 grid 
with
 a
 person 
and
 obstacles,
how
 would
 you
 find
 a
 path 
for
 the
 person
 to 
a 
particular 
destination?

The person is permitted to move left,right,up,and down.

孙宏雷 发表于 2013-7-30 17:54:36

Good Answer:Use the A * algorithm or another fast path‐finding algorithm.(It isdescribed on Wikipedia.)
页: [1]
查看完整版本: [google面试题]Given 
an 
n
 x
 n
 grid 
with
 a
 person 
and
 obstacles,
how
 would
 you
 find
 a
 path 
for
 the
 person
 to 
a 
particular 
destination?