// generate and display random binary search trees // requires node.java and treegraph.java in the same directory public class randombst { public static void main(String[] argv) { treegraph TG = new treegraph(960,700); while (true) { // generate random size of tree: int n = (int)(Math.random()*63) + 2; // 2<=n<=64 node T = new node((int)(Math.random()*100)); for(;n>0;n--) { T.insert((int)(Math.random()*100)); } TG.drawtree(T); try {Thread.sleep(5000);} catch (Exception e) {} }//while }//main }//randombst