Driver Code
public static void Main ( string [ ] args ) { int [ ] arr = new int [ ] { 4 , 5 , 7 } ; int n = arr . Length ; GFG tree = new GFG ( ) ; List < Node > trees = tree . getTrees ( arr , 0 , n - 1 ) ; Console . WriteLine ( " Preorder ▁ traversal ▁ of ▁ different ▁ " + " ▁ binary ▁ trees ▁ are : " ) ; for ( int i = 0 ; i < trees . Count ; i ++ ) { tree . preOrder ( trees [ i ] ) ; Console . WriteLine ( " " ) ; } } }