由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - full or complete binary tree的问题
相关主题
amazon一道面试题讨论个Binary search tree的题目
generate all distinct full binary trees with n leaves请问一个简单的面试题
一道大公司诡异的complete binary tree max sum of 2 nodes 题amazon first phone interview, rejected
问个amazon面试题How many different binary trees are possible with n nodes ?
问道题,binary tree里有一个有indegree 2判断 bst 疑问
Lowest common ancestor of two nodes of Binary Treenon recursive binary tree traversal in O(n) time and O(1) space
求教一道老题问个binary tree node path的概念问题
这个Binary Tree的题来看看白痴问题:TreeNode 里面有指向 parent 的指针么?
相关话题的讨论汇总
话题: binary话题: tree话题: complete话题: full话题: 问题
进入JobHunting版参与讨论
1 (共1页)
c*********t
发帖数: 2921
1
好像过去大概一个月左右的时候这里讨论过这个问题,找不到那个帖子了。
cracking the code interview (careercup)的书上说full, complete binary tree是
一回事,可是在别的地方看到的是full binary tree肯定是complete,但是complete
binary tree不一定是full.
我看到的是full binary tree,每个non-leaf node 肯定有两个children.但是complete
binary tree不是这样的。
谁能把那个帖子给弄出来?
谢谢!
d********t
发帖数: 9628
2
题目不至于这么抠字眼吧,不如具体说明好了。

complete

【在 c*********t 的大作中提到】
: 好像过去大概一个月左右的时候这里讨论过这个问题,找不到那个帖子了。
: cracking the code interview (careercup)的书上说full, complete binary tree是
: 一回事,可是在别的地方看到的是full binary tree肯定是complete,但是complete
: binary tree不一定是full.
: 我看到的是full binary tree,每个non-leaf node 肯定有两个children.但是complete
: binary tree不是这样的。
: 谁能把那个帖子给弄出来?
: 谢谢!

s******n
发帖数: 226
3
不知道是什么帖子,但是full应该就是1:2:4:。。。2^n
H****s
发帖数: 247
4
CLRS appendix 有定义,应该是权威定义了。
P**l
发帖数: 3722
5
不是一回事
full是对所有的node,要么没child,要么2个children
complete是除了最后一层,前面几层都填满node了,每层是1,2,4个node这种,最后
一层满不满无所谓,只要是从左向右没空着的就行
w******u
发帖数: 219
6
比如huffman编码的那个查找树,就是full binary tree而不是complete binary tree.
w***o
发帖数: 6775
7
正解。。

【在 P**l 的大作中提到】
: 不是一回事
: full是对所有的node,要么没child,要么2个children
: complete是除了最后一层,前面几层都填满node了,每层是1,2,4个node这种,最后
: 一层满不满无所谓,只要是从左向右没空着的就行

1 (共1页)
进入JobHunting版参与讨论
相关主题
白痴问题:TreeNode 里面有指向 parent 的指针么?问道题,binary tree里有一个有indegree 2
弱问怎么判断两个binary tree相同?Lowest common ancestor of two nodes of Binary Tree
recover binary search tree 常数空间求教一道老题
binary tree, sum of 2 nodes == given number这个Binary Tree的题来看看
amazon一道面试题讨论个Binary search tree的题目
generate all distinct full binary trees with n leaves请问一个简单的面试题
一道大公司诡异的complete binary tree max sum of 2 nodes 题amazon first phone interview, rejected
问个amazon面试题How many different binary trees are possible with n nodes ?
相关话题的讨论汇总
话题: binary话题: tree话题: complete话题: full话题: 问题