If we represent the line as slop/intersection. How should we deal with the duplicate points? Thanks.
What I did is:
Suppose p1 may be existing point, p2 is the duplicate point.
When I encounter (p1-p2), I check all existing slow/intersection map. And I add p2 to existing intersection which contains p1.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.