Function that returns the max distance between the nodes that have the same key
def computeDistance ( root , value ) : NEW_LINE INDENT if ( root == None ) : NEW_LINE INDENT return - 1 NEW_LINE DEDENT left = computeDistance ( root . left , value ) NEW_LINE right = computeDistance ( root . right , value ) NEW_LINE DEDENT