How to solve the case of (0,0),(1,1),(0,0)?

  • 0

    If we represent the line as slop/intersection. How should we deal with the duplicate points? Thanks.

  • 0

    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.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.