由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - BFS traverse O(1) space?
相关主题
print bst in level order dfs为什么是O(N)不应该是O(N^2)吗?问个google的面试题。
F家电面分享:non-recursive breadth first search and depth first search algorithm in C
bloomberg onsite题Google Front-end Software Engineer Phone Interview
MS onsite 面经问一道少见的微软面试题。
Depth-First-SearchBloomberg on-campus interview (failed) 求教
G家电面面经--佛云了~~Amazon电面经
在版上看到的G题Amazon面经
Amazon onsite面经Finding deepest node of BST ?
相关话题的讨论汇总
话题: bfs话题: traverse话题: space话题: balanced话题: bound
进入JobHunting版参与讨论
1 (共1页)
z**********g
发帖数: 209
1
How would you print a large, balanced degree-bound tree in breadth first
order, using O(1) space?
从网上看到的题目,这个可能吗
b******n
发帖数: 4509
2
可能,因为 balanced degree-bound

【在 z**********g 的大作中提到】
: How would you print a large, balanced degree-bound tree in breadth first
: order, using O(1) space?
: 从网上看到的题目,这个可能吗

k*****7
发帖数: 72
3
弱弱问一句,balanced degree-bound是什么东西。。。我搜不到,膜拜你们
b*******8
发帖数: 37364
4
平衡,且每个节点度数有上界?
l*****g
发帖数: 685
5
严格地说 degree bounded 好像是既有upper bound, 又有lower bound (leaf nodes
除外)
举个特例,balanced BST应该符合这个要求吧?但想不出怎么做BFS traverse with O(
1) space

【在 b*******8 的大作中提到】
: 平衡,且每个节点度数有上界?
t*****s
发帖数: 416
6
balanced BST 的话traverse几乎不需要空间吧?

nodes
O(

【在 l*****g 的大作中提到】
: 严格地说 degree bounded 好像是既有upper bound, 又有lower bound (leaf nodes
: 除外)
: 举个特例,balanced BST应该符合这个要求吧?但想不出怎么做BFS traverse with O(
: 1) space

l*****g
发帖数: 685
7
你是不是在说DFS?
请指教

【在 t*****s 的大作中提到】
: balanced BST 的话traverse几乎不需要空间吧?
:
: nodes
: O(

o*******p
发帖数: 722
8
impossible ba.

【在 z**********g 的大作中提到】
: How would you print a large, balanced degree-bound tree in breadth first
: order, using O(1) space?
: 从网上看到的题目,这个可能吗

o*******p
发帖数: 722
9
you can do it with a special form of DFS called back-track search, which is
discussed in Artificial Intelligence - A Modern Approach, 3rd Edition
chapter 6.

【在 o*******p 的大作中提到】
: impossible ba.
1 (共1页)
进入JobHunting版参与讨论
相关主题
Finding deepest node of BST ?Depth-First-Search
求教google 电面 answerG家电面面经--佛云了~~
请问一道题在版上看到的G题
讨论一道construct BST level by level的问题Amazon onsite面经
print bst in level order dfs为什么是O(N)不应该是O(N^2)吗?问个google的面试题。
F家电面分享:non-recursive breadth first search and depth first search algorithm in C
bloomberg onsite题Google Front-end Software Engineer Phone Interview
MS onsite 面经问一道少见的微软面试题。
相关话题的讨论汇总
话题: bfs话题: traverse话题: space话题: balanced话题: bound