Materi Pertemuan 6 Data Structure TREE & BINARY TREE
MATERI PERTEMUAN 6 Tree & Binary Tree Binary tree A binary tree is a tree in which no node can have more than two children. Each node has an element, a reference to a left child and a reference to a right child. 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”). Notes: materi lebih lengkap dapat d...