-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path23Tree_info.c
37 lines (23 loc) · 1.66 KB
/
23Tree_info.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
int main(int argc, char const *argv[])
{
/*
A Tree is a Hierachical Data Structure.
A Tree is defined as a finite set of one or more data items(nodes) such that
1. There is a special node called the root of the tree.
2. The Remaining nodes are partitioned into n>0 disjoints subsets,each of which is itself a tree,and They are called sub-trees */
/*TERMINOLOGIES
DEGREE=The number of sub-Trees of a node is called its Degree.child nodes ki counting ko degree bolegy.
LEAF=A node with degree zero is called Leaf. jiska koi child na ho wo leaf node hota hai.
Terminal Nodes: The Leaf nodes are also called terminal Nodes.
DEGREE OF TREE=The Degree Of the Tree is maximum degree of the nodes in the tree.jiske sabse jyda child nodes hongy.
ANACESTORS=The Anacestors of a node are all the nodes along the path from the root to that node...kisi node ke oper wale nodes anacestors(purwanj) hongy.
DESCENDANTS=The descendants of a node are all the nodes along the path from node to terminal node...kisi node ke niche wale nodes descendants(vansanj) hongy.
LEVEL_NUMBER=Each node is assigned a level number..the root node of tree is assigned a level number which is 1 more than the level number of its parent..start from 0..
GENERATION=Nodes with the same level number are said to belong to the same Generation..level number jo 0 se start hota hai supppose 0 to 3 hai toh ma khuga 4 generations hai..
HEIGHT/DEPTH=The height or Depth of a tree is the maximum number of nodes in a branch...
EDGE=A line drawn from a node N of T to a Successor Is Called an edge.connecting lines
PATH=Sequence of consecutive edges is called path..
BRANCH=Path ending in a leaf is called a Branch..
*/
return 0;
}