I encoded the Red Black binary statistics tree to get the rank of an arbitrary object comparable to other objects in the Red Black tree. I wonder if there is an API class that provides the same functionality.
It would be nice if a rank were assigned, the class has a function that returns an object of this rank inside the tree.
Note that Red-black BST allows these two operations in log (n) time, where n is the number of objects in the tree.
fodon source
share