除了trivial tree之外,the root of a tree都算是internal vertex而非leaf。
Descendant: 在rooted tree上面同一個path中較下面的點。
v是binary tree上的一個點,那麼以v的left child和right child所形成的tree稱為左子樹和右子樹,簡寫為Lv和Rv。
Full binary tree代表每個點不是沒有children就是有兩個children。一個full binary tree若是有i個internal vertices,那麼就有i+1個terminal vertices並且總共有2i + 1個vertices。
Inorder traversal(左中右), preorder traversal(中左右)和postorder traversal(左右中)。
Binary search tree: left child < parent < right child
Descendant: 在rooted tree上面同一個path中較下面的點。
v是binary tree上的一個點,那麼以v的left child和right child所形成的tree稱為左子樹和右子樹,簡寫為Lv和Rv。
Full binary tree代表每個點不是沒有children就是有兩個children。一個full binary tree若是有i個internal vertices,那麼就有i+1個terminal vertices並且總共有2i + 1個vertices。
Inorder traversal(左中右), preorder traversal(中左右)和postorder traversal(左右中)。
Binary search tree: left child < parent < right child
留言
張貼留言