问个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.
为什么只要看前两层呢?请大牛们指点下啊。
level we only need to test if it has been visited in the
previous two levels.
为什么只要看前两层呢?请大牛们指点下啊。