public void Add(int value) { var t = Allocate(value); Root = Merge(Root, t); }
private static int Count(TreapNode t) { return(t != null ? t.Count : 0); }
public int GetIdx(TreapNode node) { PushUp(node); return(GetIdxInternal(node)); }