static BinaryTree<Integer> buildComplete(int n){
  BinaryTree<Integer> bt=new BinaryTree<Integer>();
  int b=(int)Math.pow(2,n - 1);
  for (int i=0; i < n; i++) {
    bt.insert(b);
    for (int j=1; j <= Math.pow(2,i) - 1; j++) {
      bt.insert(b + 2 * b * j);
    }
    b=b / 2;
  }
  return bt;
}

static BinaryTree < Integer > buildComplete ( int n ) { BinaryTree < Integer > bt = new BinaryTree < Integer > ( ) ; int b = ( int ) Math . pow ( 2 , n - 1 ) ; for ( int i = 0 ; i < n ; i ++ ) { bt . insert ( b ) ; for ( int j = 1 ; j <= Math . pow ( 2 , i ) - 1 ; j ++ ) { bt . insert ( b + 2 * b * j ) ; } b = b / 2 ; } return bt ; }
build a complete tree with 2 ^ n - 1 nodes .
