HOME. NEXT. Subject Name: Data Structure Using C Unit Title: Trees. PREVIOUS. NEXT. Trees. Definition of Tree Terminologies Type of Trees Complete Binary Tree Full/Strictly Binary Tree Binary Search Tree Threaded Binary Tree Red Black Tree B Tree [Balance Tree] AVL Tree
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
HOME
NEXT
Subject Name: Data Structure Using C
Unit Title: Trees
PREVIOUS
NEXT
Trees
Definition of Tree : A general Tree T is a finite nonempty set of elements having unique connection between any pair of vertices. The set of elements are called vertices and connections are called edges.
HOME
NEXT
PREVIOUS
A
C
B
E
D
G
F
Tree T
HOME
NEXT
PREVIOUS
Grand Parent
edge
root
A
parent
Internal node
B
E
F
child
leaf
C
D
G
H
General Tree
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
A
HOME
NEXT
PREVIOUS
B
C
E
D
F
G
K
J
I
H
M
O
L
N
HOME
NEXT
PREVIOUS
A
B
C
E
D
F
G
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
- Every simple path from a node to a descendant leaf contains the same number of black nodes, either counting or not counting the null black nodes. (Counting or not counting the null black nodes does not affect the structure as long as the choice is used consistently.)
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
Example 1: Detail Diagram
Example 2: Simple Diagram
HOME
NEXT
PREVIOUS
-1
20
-1
10
30
+1
+1
0
40
25
0
5
0
20
HOME
NEXT
PREVIOUS
HOME
NEXT
PREVIOUS
A
C
B
Preorder Sequence : A B D F C E G
E
D
G
F
HOME
NEXT
PREVIOUS
A
C
B
Inorder Sequence : F D B A E G C
E
D
G
F
HOME
NEXT
PREVIOUS
A
C
B
Postorder Sequence : F D B G E C A
E
D
G
F
HOME
NEXT
PREVIOUS
HOME
PREVIOUS