Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT mp = { } NEW_LINE preIndex = 0 NEW_LINE inn = [ ' D ' , ' B ' , ' E ' , ' A ' , ' F ' , ' C ' ] NEW_LINE pre = [ ' A ' , ' B ' , ' D ' , ' E ' , ' C ' , ' F ' ] NEW_LINE lenn = len ( inn ) NEW_LINE root = buldTreeWrap ( inn , pre , lenn ) NEW_LINE DEDENT