Why does this test case has an expected answer of 3? [[1,1],[1,1],[2,3]]


  • 0
    R

    I am confused by the description of the problem. Why does [[1,1],[1,1],[2,3]] output a result of 3? I think it is 2. Any help is appreciated!!


  • 0

    The problem is actually asking the max number of elements in the given vector<Point> points which are on a same line, so elements of identical x, yvalues are considered multiple times as well (just like identical values in array, they are still different elements in the container because of different indices) I guess a better clarification from the problem would be better.


  • 0
    R

    @zzg_zzm Thank you very much for your explanation! Now I understand what the question is asking me to do.


Log in to reply
 

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