Driver Program to test above functions
public static void main ( String args [ ] ) { int in [ ] = { 4 , 5 , 7 } ; int n = in . length ; BinaryTree tree = new BinaryTree ( ) ; Vector < Node > trees = tree . getTrees ( in , 0 , n - 1 ) ; System . out . println ( " Preorder ▁ traversal ▁ of ▁ different ▁ " + " ▁ binary ▁ trees ▁ are : " ) ; for ( int i = 0 ; i < trees . size ( ) ; i ++ ) { tree . preOrder ( trees . get ( i ) ) ; System . out . println ( " " ) ; } } }