Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT v1 = 0 NEW_LINE v2 = 0 NEW_LINE root = Node ( 1 ) NEW_LINE root . left = Node ( 2 ) NEW_LINE root . right = Node ( 3 ) NEW_LINE root . left . left = Node ( 4 ) NEW_LINE root . left . right = Node ( 5 ) NEW_LINE root . right . left = Node ( 6 ) NEW_LINE root . right . right = Node ( 7 ) NEW_LINE root . left . right . left = Node ( 8 ) NEW_LINE root . right . left . right = Node ( 9 ) NEW_LINE n1 = 4 NEW_LINE n2 = 8 NEW_LINE printCommonPath ( root , n1 , n2 ) NEW_LINE DEDENT