예제 #1
0
        public void Add(int value)
        {
            var t = Allocate(value);

            Root = Merge(Root, t);
        }
예제 #2
0
 private static int Count(TreapNode t)
 {
     return(t != null ? t.Count : 0);
 }
예제 #3
0
 public int GetIdx(TreapNode node)
 {
     PushUp(node);
     return(GetIdxInternal(node));
 }