Postingan

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

Gambar
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...

pert 4 - Binary Tree And Expression Tree - 2101680123 - MILLIADY KUSNADI THE BU HIAP

Introduction to Tree, Binary Tree And Expression Tree A.    Tree Concept Tree is a collection of one or more nodes. DEGREE of TREE = 3 DEGREE of C = 2 HEIGHT = 3 PARENT of C = A CHILDREN of   A = B, C, D SIBILING of F = G ANCESTOR of F = A, C DESCENDANT of C = F, G •          Node at the top is called as root . •          A line connecting the parent to the child is edge . •          Nodes that do not have children are called leaf . •          Nodes that have the same parent are called sibling . •          Degree of node is the total sub tree of the node. •          Height/Depth is the maximum degree of nodes in a tree. •          If there is a line that con...