你的孩子有赚钱的命吗?# Parenting - 为人父母
s*i
1 楼
系里的一个印度铁哥们透露给我的,他签了nda所以我就不透露是哪家了,大家应该也
能猜到。
software dev position。
how to design an algorithm to solve this problem:
given a house with several rooms, and a moving enemy, and your robot. the
path
and timing of the enemy is known. try to design a path for your robot that
can
traverse all rooms (can be visited several times) and avoid the enemy. that
is, your robot can not be in the same room at any time during your
traversal.
example: a 2x2 matrix is the house, and each cell is a room. the enemy start
from (1,1), and keep going to (1,2), (2,2), (2,1) then back to (1,1), each
step takes 1 second. your bot starts at a different cell as the enemy and
one strategy is synchronizing with the enemy.
what data structure
what algorithm
how do u improve the total traversing time?
45 min to solve, white board for pseudo code.
能猜到。
software dev position。
how to design an algorithm to solve this problem:
given a house with several rooms, and a moving enemy, and your robot. the
path
and timing of the enemy is known. try to design a path for your robot that
can
traverse all rooms (can be visited several times) and avoid the enemy. that
is, your robot can not be in the same room at any time during your
traversal.
example: a 2x2 matrix is the house, and each cell is a room. the enemy start
from (1,1), and keep going to (1,2), (2,2), (2,1) then back to (1,1), each
step takes 1 second. your bot starts at a different cell as the enemy and
one strategy is synchronizing with the enemy.
what data structure
what algorithm
how do u improve the total traversing time?
45 min to solve, white board for pseudo code.