Suppose I have a RB-tree consisting of numbers which correspond to people's age; and suppose each node also have a gender (female or male).
My question is, how to get a specific number from that tree using OS-SELECT and rank value? Specific number means, find 2nd youngest man in the tree.
Example: OS-SELECT(root, 2) which returns second youngest man of the tree.
The aim is not just finding the 2nd or third yougest node, the aim is to find 2nd youngest men or 2nd youngest women