Introduction to tree

MdRakibTrofder 584 views 29 slides Apr 17, 2020
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

This slide is about all attributes and properties of "Tree" in data structure and algorithm at computer science. Students can able to get a quick overview of "Tree" from this presentation.


Slide Content

General Tree Created By : 1

Powered by : 2

TALK ABOUT What is tree Definition of general tree Properties of general tree Simulation of general tree Examples of general tree Implementation 3

What is tree   A   tree  is a widely used  abstract data type  (ADT) that simulates a hierarchical  tree structure, with a root value and subtrees of children with a  parent node, represented as a set of linked  nodes. 4

Definition A general tree is a tree where each node may have zero or more children (a binary tree is a specialized case of a general tree). General trees are used to model applications such as file systems. 5

Properties : A C B D E F G H I Number of Nodes : 9 1 3 2 4 5 6 7 8 9 6

Properties : A C B D E F G H I Height of the tree : 2 1 2 7

Properties : A C B D E F G H I Root 8

Properties : A C B D E F G H I Leaves 9

Properties : A C B D E F G H I Interior nodes 10

Properties : A C B D E F G H I A , C are Ancestors of G 11

Properties : A C B D E F G H I B , F are Descendants of A 12

Properties : A C B D E F G H I G ,H ,I are Siblings 13

Properties : A C B D E F G H I Subtree 14

Properties : A C B D E F G H I Degree of the tree : 3 1 2 3 15

Simulation of general tree IIT BSSE M SSE Progra-mming Soft-ware Analysis MIT Data-base Management Spl-2 Spl-1 Re-search Thesis Spl-3 16

Examples of General Tree 17

Binary Tree : A B D E H I K J C F G L M O N 18

Balance Tree : A B D E H I K J F L M O N C G F 19

Unbalance Tree : 13 7 11 14 18 20

Red -Black Tree : A B D E I C F G O N NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 21

B Tree : 3 30 60 4 5 6 1 2 65 72 76 85 90 40 50 22

Implementation 23

Implementation 24

Implementation 25

Implementation 26

Implementation 27

28

29