Question

I was studying Red Black trees and I was wondering what is the time complexity for assigning black heights for each node when we do a process like insert ?

Was it helpful?

Solution

Insertion to a Red Black tree costs log(N)...check out this cool link for other complexities of various data structures/algorithms...

http://bigocheatsheet.com/

another useful link showing how insertion/deletion/rearranging of nodes takes place in a red black tree...

http://www.cs.usfca.edu/~galles/visualization/RedBlack.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top