國內教材對滿二叉樹的定義:
一棵深度為k且有2^k-1個結點的二叉樹稱為滿二叉樹. ————嚴蔚敏《資料結構(C語言版)》124頁
即達到飽和的二叉樹。也可以這麼定義:
同時滿足下面兩個條件的二叉樹稱為滿二叉樹:
(1)每個結點要麼有兩個子結點,要麼沒有子結點;
(2)葉子結點只能出現在最後一層。
是一棵符合國內教材定義的滿二叉樹:
國際上對full binary tree的定義:
A binary tree in which each node has exactly zero or two children.In other words, every node is either a leaf or has two children. For efficiency, any Huffman coding is a full binary tree.
———— NIST: http://xlinux.nist.gov/dads/HTML/fullBinaryTree.html
用中文描述一下,也可以這樣定義:
滿足下面這個條件的二叉樹稱為滿二叉樹:
每個結點要麼有兩個子結點,要麼沒有子結點。
是一棵符合NIST定義的滿二叉樹:
可見,國際上對full binary tree的定義比國內教材對滿二叉樹的定義放寬了要求,不要求所有葉子幾點必須在最後一層出現。
國內教材定義的滿二叉樹這類樹,NIST也有相應的定義,稱為perfect binary tree:
A binary tree with all leaf nodes at the same depth. All internal nodes have degree 2.
————NIST: http://xlinux.nist.gov/dads/HTML/perfectBinaryTree.html
國內教材定義的完全二叉樹和國際定義的complete binary tree相符:
A binary tree in which every level, except possibly the deepest, is completely filled. At depth n, the height of the tree, all nodes must be as far left as possible.
————http://xlinux.nist.gov/dads/HTML/completeBinaryTree.html
是一棵完全二叉樹: