Elements in a tree can be indexed by its position under the ordering of the keys and the ordinal position of an element can be determined, both with good efficiency.

Category: QuestionsElements in a tree can be indexed by its position under the ordering of the keys and the ordinal position of an element can be determined, both with good efficiency.
Editor">Editor Staff asked 1 month ago

Elements in a tree can be indexed by its position under the ordering of the keys and the ordinal position of an element can be determined, both with good efficiency.
 
(a) true
 
(b) false
 
This interesting question is from Weight Balanced Tree topic in division Binary Trees of Data Structures & Algorithms I
 
The question was asked during an internship interview.

1 Answers
Editor">Editor Staff answered 1 month ago

Right option is (a) true
 
To explain: In a weight balanced tree we can even store the key information so as to use as a key value pair.