Augmented red black tree based on Emin's code.