Consider the following
What is the rank(index) of the node $50?$
According to the question, It could be zero-based or 1-based Indexing.
https://stackoverflow.com/questions/26080924/computing-rank-of-a-node-in-a-binary-search-tree
http://www.cs.princeton.edu/courses/archive/spr09/cos423/Lectures/rbtrees.pdf
64.3k questions
77.9k answers
244k comments
80.0k users