PPT Slide
How can a tree be represented in an array?
Place the root of the tree in element 1 of the array
Place the root’s left child in element 2 (RootPos*2)
Place the root’s right child in element 3 (RootPos*2+1)
The children of 57 are placed in:Left Child (87): ParentPos*2 = 2*2 = 4Right Child (15): ParentPos*2+1 = 2*2+1 = 5