Array Representation of a Tree
Draw a binary tree indicated by each array:
Child
1
2
3
4
5
6
7
Parent
6
4
2
0
4
5
6
Child
1
2
3
4
5
6
7
Parent
6
4
1
7
4
5
0
Index
L
Data
R
0
1
2
0
2
0
1
3
4
0
4
5
0
5
0
3
6
0
Index
L
Data
R
0
1
6
3
2
0
0
3
0
1
4
0
2
5
4
0
6
0
Do a preorder and postorder traversal of each of the arrays.
Continue to:
Unit 8
/
Prev
/
Next