Driver program to test above function
inp = [ 4 , 5 , 7 ] NEW_LINE n = len ( inp ) NEW_LINE trees = getTrees ( inp , 0 , n - 1 ) NEW_LINE print " Preorder ▁ traversals ▁ of ▁ different ▁ possible\ STRNEWLINE ▁ Binary ▁ Trees ▁ are ▁ " NEW_LINE for i in trees : NEW_LINE INDENT preorder ( i ) ; NEW_LINE print " " NEW_LINE DEDENT