public Tuple <int, int> EqualRange(T v) { if (!Contains(v)) { return(new Tuple <int, int>(-1, -1)); } return(new Tuple <int, int>(SB_BinarySearchTree <T> .LowerBound(_root, v), SB_BinarySearchTree <T> .UpperBound(_root, v) - 1)); }
public int LowerBound(T v) { return(SB_BinarySearchTree <T> .LowerBound(_root, v)); }
public int Count(T v) { return(SB_BinarySearchTree <T> .UpperBound(_root, v) - SB_BinarySearchTree <T> .LowerBound(_root, v)); }