Next: 4.1.4 Data Structures for Tree Representation
Up: 4.1 Introduction
Previous: 4.1.2 Preorder, Inorder, Postorder
A tree ADT can be defined to comprise the following operations.
- 1.
- parent (n, T)
- 2.
- lmostchild (n, T)
- 3.
- rsibling (n, T)
- 4.
- root (T)
- 5.
- makenull (n, T)
- 6.
- height (n, T)
- 7.
- depth (n, T)
- 8.
- createi
(v, T1, T2,..., Ti) creates the tree shown in
Figure 4.3
Figure 4.3:
A tree with i subtrees
|
eEL,CSA_Dept,IISc,Bangalore