find_tangent() runs in linear time