Find minimum and maximum value in the path from LCA to b
while j < len ( Path2 ) : NEW_LINE INDENT if min2 > Path2 [ j ] : NEW_LINE INDENT min2 = Path2 [ j ] NEW_LINE DEDENT if max2 < Path2 [ j ] : NEW_LINE INDENT max2 = Path2 [ j ] NEW_LINE DEDENT j += 1 NEW_LINE DEDENT