Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary Search Tree In order Pre order Post order Search Insertion

Similar presentations


Presentation on theme: "Binary Search Tree In order Pre order Post order Search Insertion"— Presentation transcript:

1 Binary Search Tree In order Pre order Post order Search Insertion
Deletion

2 More BT Traverse to the bottom of the tree
Insert as the appropriate child

3 More BT Find target node Set left child to child of min of right
Set right child to child of parent

4 Red Black Tree Left/Right rotate Insert Delete

5 Rotate Target becomes child of right
Target’s right child’s left child becomes target’s right child

6 Insert Cannot have red parent for red node

7 Delete Deletion depends on which node is chosen Remove target node
Make sure that the rules are not broken


Download ppt "Binary Search Tree In order Pre order Post order Search Insertion"

Similar presentations


Ads by Google