Red Black Tree Essentials Notes from “Introduction

Red Black Tree Essentials Notes from “Introduction
1 / 1
Red Black Tree Essentials Notes from “Introduction - slide 1 of 10 Red Black Tree Essentials Notes from “Introduction - slide 2 of 10 Red Black Tree Essentials Notes from “Introduction - slide 3 of 10 Red Black Tree Essentials Notes from “Introduction - slide 4 of 10 Red Black Tree Essentials Notes from “Introduction - slide 5 of 10 Red Black Tree Essentials Notes from “Introduction - slide 6 of 10 Red Black Tree Essentials Notes from “Introduction - slide 7 of 10 Red Black Tree Essentials Notes from “Introduction - slide 8 of 10 Red Black Tree Essentials Notes from “Introduction - slide 9 of 10 Red Black Tree Essentials Notes from “Introduction - slide 10 of 10
Red Black Tree Essentials Notes from Introduction to Algorithms, Cormen et al. Definition Red Black Trees A red-black tree is a binary search tree with an extra bit of storage per node. The extra bit represents the color of the node. Its

Related Topics

Download this presentation From Below

"Red Black Tree Essentials Notes from “Introduction" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
Red Black Tree Essentials Notes from “Introduction to Algorithms”, Cormen et al.<br>
02
Definition Red Black Trees

A red-black tree is a binary search tree with an extra bit of storage per node.
The extra bit represents the color of the node. It's either red or black.
Each node contains the fields: color, key, left, right, and p. Any nil pointers are regarded as pointers to external nodes (leaves) and key bearing
nodes are considered as internal nodes of the tree.
See the video at:
http://www.youtube.com/watch?v=vDHFF4wjWYU<br>
03
Properties Red-black tree properties:
1. Every node is either red or black.
2. The root is black.
3. Every leaf (nil) is black.
4. If a node is red then both of its children are
black.
5. For each node, all paths from the node to
descendant leaves contain the
same number of black nodes.<br>