Search code examples
algorithmbinary-search-treered-black-tree

I have question with this left-rotate algorithm for red and black trees


I'm almost done with this assignment, but I'm having trouble applying this algorithm into my code for an assignment. I'm just confused with what is T and what it does in the code from the picture.

The code from the picture is a left-rotate algorithm


Solution

  • T is the tree in which the rotate operation is being performed. Note the references in the algorithm to T.root.