p***d 发帖数: 201 | 1 “Was asked a very interesting tree problem.Given a tree and a number N,
construct another tree such that each node of the tree has either 0 or N
elements,except for one node which has between 0 to N elements.Only other
constraint is that ancestry is preserved in the new tree. ”
看面经,遇到这个提,我不太懂什么叫each node of the tree has either 0 or N
elements?大家有什么看法? |
n******n 发帖数: 12088 | 2 leaf或者n个子树,根除外
【在 p***d 的大作中提到】 : “Was asked a very interesting tree problem.Given a tree and a number N, : construct another tree such that each node of the tree has either 0 or N : elements,except for one node which has between 0 to N elements.Only other : constraint is that ancestry is preserved in the new tree. ” : 看面经,遇到这个提,我不太懂什么叫each node of the tree has either 0 or N : elements?大家有什么看法?
|
p***d 发帖数: 201 | 3 你是说构建一个树,每一个node都有0 或N leaf? 说不过去呀!
【在 n******n 的大作中提到】 : leaf或者n个子树,根除外
|
p***d 发帖数: 201 | 4 “Was asked a very interesting tree problem.Given a tree and a number N,
construct another tree such that each node of the tree has either 0 or N
elements,except for one node which has between 0 to N elements.Only other
constraint is that ancestry is preserved in the new tree. ”
看面经,遇到这个提,我不太懂什么叫each node of the tree has either 0 or N
elements?大家有什么看法? |
n******n 发帖数: 12088 | 5 leaf或者n个子树,根除外
【在 p***d 的大作中提到】 : “Was asked a very interesting tree problem.Given a tree and a number N, : construct another tree such that each node of the tree has either 0 or N : elements,except for one node which has between 0 to N elements.Only other : constraint is that ancestry is preserved in the new tree. ” : 看面经,遇到这个提,我不太懂什么叫each node of the tree has either 0 or N : elements?大家有什么看法?
|
p***d 发帖数: 201 | 6 你是说构建一个树,每一个node都有0 或N leaf? 说不过去呀!
【在 n******n 的大作中提到】 : leaf或者n个子树,根除外
|
b********r 发帖数: 620 | 7 kind of like complete tree, only the last non-leaf node could be exception.
【在 p***d 的大作中提到】 : 你是说构建一个树,每一个node都有0 或N leaf? 说不过去呀!
|