Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Client {
- public static void main(String[] args) {
- ColourTree<Integer, Character> Tree = new ColourTree<>();
- int h = StdRandom.uniform(0, 1000);//Задать количество узлов
- StdOut.println("Quantity of nodes: "+h);
- for (int i = 0; i < h;i++)//Заполнение дерева
- {
- Tree.put(StdRandom.uniform(100),(char)StdRandom.uniform(0,150));
- }
- if (Tree.toBalance()==true)//Проверка на сбалансированность
- StdOut.println("Balanced");
- else
- StdOut.println("Is not balanced");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement