Redian新闻
>
你的孩子有赚钱的命吗?
avatar
你的孩子有赚钱的命吗?# 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.
avatar
g*s
3
what kind of layout for all rooms in this house, a grid?

the
that
that
traversal.

【在 s*i 的大作中提到】
: 系里的一个印度铁哥们透露给我的,他签了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

avatar
n*y
4
这话说的,跟所有得犹太人都很会做生意似的。
avatar
s*i
5
yes

【在 g*********s 的大作中提到】
: what kind of layout for all rooms in this house, a grid?
:
: the
: that
: that
: traversal.

avatar
y*u
6
还有teenage书不想读, 天天就是非死不可上聊天

【在 a****t 的大作中提到】
: 龙生龙,凤生凤。老鼠的孩子会打洞。
: 凭什么,犹太人,温州人,北印度的阿三这么会做生意。
: 大家有什么好办法,让家里的Teenager不光只会读书。
: Curiosity-->Creativity-->Cash
: http://video.foxbusiness.com/v/3889415/secrets-of-the-richest-k
: http://astore.amazon.com/xiaoxiaoshuwu-20/detail/0981970907
: http://www.entrepreneur.com/tsu
: http://www.inc.com/30under30/2011/index.html

avatar
B*n
7
robot起始位置可以随便选吗?如果可以的话,只要选择奇偶与enemy相反就可以任意走了.
start point enemy (a, b), robot (x, y), as long as (x+y) % 2 != (a+b) % /2

that

【在 s*i 的大作中提到】
: 系里的一个印度铁哥们透露给我的,他签了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

avatar
w*e
8
这样也挣很多钱,哈哈
http://www.pisd.edu/news/archive/2011-12/broad.com.winner.shtml

【在 a****t 的大作中提到】
: 龙生龙,凤生凤。老鼠的孩子会打洞。
: 凭什么,犹太人,温州人,北印度的阿三这么会做生意。
: 大家有什么好办法,让家里的Teenager不光只会读书。
: Curiosity-->Creativity-->Cash
: http://video.foxbusiness.com/v/3889415/secrets-of-the-richest-k
: http://astore.amazon.com/xiaoxiaoshuwu-20/detail/0981970907
: http://www.entrepreneur.com/tsu
: http://www.inc.com/30under30/2011/index.html

avatar
l*r
9
可以假设只能沿着grid移动把,(1,1)to (2,2) not allowed.

【在 s*i 的大作中提到】
: yes
avatar
l*r
10
如果是沿着grid走的话,每一步奇偶性都会变一下。这样robot只要比enemy晚一步出门
就可以直接遍历所有room了。
不知道对面走允不允许,比如说enemy在(1,2)的时候robot start from (1,1)下一步
他们互换位置。

了.

【在 B********n 的大作中提到】
: robot起始位置可以随便选吗?如果可以的话,只要选择奇偶与enemy相反就可以任意走了.
: start point enemy (a, b), robot (x, y), as long as (x+y) % 2 != (a+b) % /2
:
: that

avatar
c*w
11
万一enemy有一步是停在一个房间不动呢?

了.

【在 B********n 的大作中提到】
: robot起始位置可以随便选吗?如果可以的话,只要选择奇偶与enemy相反就可以任意走了.
: start point enemy (a, b), robot (x, y), as long as (x+y) % 2 != (a+b) % /2
:
: that

avatar
s*i
12
it seems that they are looking for graph search algorithm
avatar
l*a
13
那就先把别的屋遍历了,
等他一出来就进去

【在 c******w 的大作中提到】
: 万一enemy有一步是停在一个房间不动呢?
:
: 了.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。