(from: data structures using c aaron m. tenenbaum):
"a complete binary tree of depth d strictly binary tree of leaves @ level d."
so, meaning following tree should not complete binary tree, right?
http://cs-study.blogspot.de/2012/11/complete-binary-tree.html
but, according wikipedia: in complete binary tree every level, except possibly last, filled, , nodes in last level far left possible. can have between 1 , 2h nodes @ last level h.
please clarify confusion.
my interpretation:
- on level 1..d-1 there nodes, , of them must exist.
- at level d, leaves exists, , must filled left right
- nodes without children not considered leaves on level d-1
Comments
Post a Comment