I have an 2-3 tree where each leaf consists of:
- Key
- Value
The tree is ordered by the keys.
I want to find the maximum value between 2 keys i < j (in domain [i,j]), within worst case O(logn).
It is clear to me that I need to store additional information such as "maximum in a subtree". However I can't come up with precise algorithm of going over all relevant subtrees to achieve my goal.
[EDIT] I'm looking for something similar to the following thread:
Search max value between 2 AVL nodes
The only difference is that I'm interested in 2-3 tree.