Isn't the below expectation wrong?


  • 2
    P

    Input: [(0,0),(0,0)]
    Output: 1
    Expected: 2

    (0.0) is a single point. IMO, the other duplicate must be removed and only one point must be returned. And with a single point in the list, the output is 1.


  • 0
    V

    One need to find the maximum number of points that lie on the same straight line;

    For the given input [(0,0),(0,0)] both the points (0,0) and (0,0) lie on the same straight line hence the output must be 2.


  • 0
    P

    They are not 2 different points. Both represent the same point. The second one is a duplicate. If you draw a line that passes through 0,0 , max points that lie on that line is 1. The other one is redundant. It is a duplicate


  • 0
    V

    According to problem statement "Maximum number of points that lie on same straight line " problem statement doesn't stress on only non duplicated points, hence it may not be wrong to include duplicated points as well.


Log in to reply
 

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