Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = newNode ( 1 , None ) NEW_LINE root . left = newNode ( 2 , root ) NEW_LINE root . right = newNode ( 3 , root ) NEW_LINE root . left . left = newNode ( 4 , root . left ) NEW_LINE root . left . right = newNode ( 6 , root . left ) NEW_LINE root . left . left . left = newNode ( 7 , root . left . left ) NEW_LINE root . left . left . left . left = newNode ( 10 , root . left . left . left ) NEW_LINE root . left . right . right = newNode ( 9 , root . left . right ) NEW_LINE root . right . right = newNode ( 5 , root . right ) NEW_LINE root . right . right . right = newNode ( 8 , root . right . right ) NEW_LINE root . right . right . right . right = newNode ( 12 , root . right . right . right ) NEW_LINE DEDENT