Пример #1
0
 public static Treap Treapify(int[] x, int[] y) {
     Treap Root = new Treap();
     for (int i = 0; i < 11; i++) {
         Root = Root.Grow(x[i], y[i]);
     }
     return Root;
 }
Пример #2
0
        public static Treap Treapify(int[] numbers) {
            Random dice = new Random();
            Treap Root = new Treap();

            foreach (int number in numbers)
                Root = Root.Grow(number, dice.Next());
            return Root; 
        }
Пример #3
0
        public static Treap Treapify(int[] x, int[] y)
        {
            Treap Root = new Treap();

            for (int i = 0; i < 11; i++)
            {
                Root = Root.Grow(x[i], y[i]);
            }
            return(Root);
        }
Пример #4
0
        public static Treap Treapify(int[] numbers)
        {
            Random dice = new Random();
            Treap  Root = new Treap();

            foreach (int number in numbers)
            {
                Root = Root.Grow(number, dice.Next());
            }
            return(Root);
        }