Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree.

Similar presentations


Presentation on theme: "Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree."— Presentation transcript:

1 Hello Everyone!!! 1

2 Tree And Graphs 2

3 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree with 0 to 2 children per node 3 Trees

4 Binary Search Trees  Key property Value at node Smaller values in left subtree Larger values in right subtree 4

5  Types of Binary Trees Degenerate – only one child Complete – always two children Balanced – mostly two children 5

6  Binary Search Tree – Insertion Algorithm If X Y, insert new leaf X as new right subtree for Y 6  Binary Search Tree – Deletion Leaf Internal Node

7  Preorder Traversal  Post order Traversal  In-order Traversal 7 Binary Tree Traversal Types

8 Graphs 8 Directed graphs Undirected graphs.

9  About graphs Vertex or Node(V) Edge or arc (E) Source (u) Sink (v) 9

10  Depth-First Search (DFS)  Breadth-First Search (BFS) 10

11 Thank You! 11


Download ppt "Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree."

Similar presentations


Ads by Google