Exemple #1
0
 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));
 }
Exemple #2
0
 public int LowerBound(T v)
 {
     return(SB_BinarySearchTree <T> .LowerBound(_root, v));
 }
Exemple #3
0
 public int Count(T v)
 {
     return(SB_BinarySearchTree <T> .UpperBound(_root, v) - SB_BinarySearchTree <T> .LowerBound(_root, v));
 }