Driver code
public static void Main ( String [ ] args ) { int [ ] init = { 4 , 8 , 2 , 5 , 1 , 6 , 3 , 7 } ; int [ ] post = { 8 , 4 , 5 , 2 , 6 , 7 , 3 , 1 } ; int n = init . Length ; Node root = buildTree ( init , post , n ) ; Console . Write ( " Preorder ▁ of ▁ the ▁ constructed ▁ tree ▁ : ▁ STRNEWLINE " ) ; preOrder ( root ) ; } }