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 ?
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 ?
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