avatar
问个BFS leetcode# JobHunting - 待字闺中
f*e
1
in BFS, when testing if a node can be added to the new
level we only need to test if it has been visited in the
previous two levels.
为什么只要看前两层呢?请大牛们指点下啊。
avatar
f*e
2
求解答 求关注 :-)
avatar
a*a
3
This rule works for WordLadder, but it is not applicable to BFS in general.
avatar
g*y
4
tree的话只需看前一层,以此类推有特殊的图可以只看前两层

.

【在 a***a 的大作中提到】
: This rule works for WordLadder, but it is not applicable to BFS in general.
avatar
f*e
5
many thanks, hug :-)

.

【在 a***a 的大作中提到】
: This rule works for WordLadder, but it is not applicable to BFS in general.
avatar
f*e
6
many thanks, hug :-)

【在 g*****y 的大作中提到】
: tree的话只需看前一层,以此类推有特殊的图可以只看前两层
:
: .

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