Nodes
Nodes
Nodes
This is the main component of any tree structure the concept of the node is
the same as that used in a linked list. A node of a tree is stores the extual data and
links to the other node.
Lc Data Rc
1
2 3
Parents
Parents of a node is the immediate predecessor of a node
Child
If the immediate predecessors of a node are connected to a
parents of a node, then all premade producer node are known
as child
i.e 2,3 are the child of 1
and 4,5,6 are the child of 2,3
Link
This is the pointer to a node in a tree Lc and Rc left child and
right child are linked
Node that there will be more than two links of a
node
Page 2 of 9
Root
It is the specially designed node each have no parent
e.g 1is the root node in fig
Leaf node
The node which to at that end and does note have
any child link
Level
Level is the rank in the hierarchy the node to has level zero is
the node to level(l) Then is the true of all nodes excepted the
root node in as level zero
1 1
2 3
2
4
5 6
7
3
8
9 10 11 12 13 14
15 4
Page 3 of 9
The maximum no of nodes that is possible in the path starting from the root node to a leaf node is
called the height of the tree
In the first level there are user there are only terminal given to the user in
next level there are cell compiler cell commands and system libraries
In third level it have a interface to the system fall and parallel having interface there is
continuous flow of data and command true and fall system and parallel
In the 4th level there are single terminal handing and the I/o system there is similarly this control
server as the demand of user in the same level their file system based and as a thought their file
system to which user is
There are also sloping from I/O system the CPU provide the time / to the process there are
also page and remain which are their to execute the user program
6th level there are controller such as terminal controller device controller memory
controller , physical memory controller
1. Switching the CPU among process the operating system can make the computer more
productive
2. Multiprogram operating system diff of though put
Dispatcher is a modular that gives controller of CPU two the process selected by scheduler
Binary tree
It tree can defined finite last node such that T is empty (binary tree )
(III) The contain are specially design node called the root of T and the remaining node of B from
to disjoint binary digit T1 and T2 which are called as the left sub tree and the right sub tree
receptivity
A T2
T1 B C
I
D E H
F J
G
Page 4 of 9
B C
D E F G
H I J K L M N O
B C
D
E F G
H J K
I
Page 5 of 9
In-order Traversals
In this traversals report the left of the root to is digits than the root node and after the
right of the root node are is visited
Tl R Tr
A
B C
D E F
G
H
I J
Ans.-D,B,H,E,K,A,F,C,I,G,J
K
B
C
D
F
E
G
K
L
Q J
P
M O I
N
Ans.- M,K,D,N,L,O,B,E,P,A,F,Q,C,I,G,R,J
FIG-2.0
Page 6 of 9
Pre-order Traversals
In this traversals root is written first and the left sub-tree in pre-order Pasion and
then the right sub-tree in pre-order Pasion such as traversals
R Tl Tr
A C
B
G
D
H E F M
L
I J
K
Ans.-A,B,D,H,I,E,J,K,C,F,G,L,M
FIG.-2.0
Ans.- A,B,D,K,M,L,N,O,E,P,C,F,Q,G,I,J,R
Page 7 of 9
Page 8 of 9
Page 9 of 9