pert 5 - Tree & Binary Tree - 2101680123 - Milliady Kusnadi The Bu Hiap

Tree & Binary Tree Binary Tree Concept A sample of binary tree of 9 nodes, rooted on node which contains 18. Leaves are nodes which contain 9, 12, 10 and 23. Type of Binary Tree • PERFECT binary tree is a binary tree in which every level are at the same depth. • COMPLETE binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. A perfect binary tree is a complete binary tree. • SKEWED binary tree is a binary tree in which each node has at most one child. • BALANCED binary tree is a binary tree in which no leaf is much farther away from the root than any other leaf (different balancing scheme allows different definitions of “much farther”). PERFECT Binary Tree COMPLET...