Hi,
does your data structures has predeccesor or successor functions?
The predecessor(x) function give the the maximum value smaller than x containing in the data structure and the successor(x) function give the minimum value greater than x, which contains the data structure.
T