When I write my code for problem “Max Points on a Line” , I found the some wrong test case result for this problem!

This is output for my result:

Submission Result: Wrong Answer

Input: [(0,0),(1,1),(0,0)]

Output: 2

Expected: 3

U can see the input [(0,0),(1,1),(0,0)] has same (0,0) points ,so u can’t count them for twice .in fact this the result for max points in same line should be 2((0,0) (1,1)) and not 3 !

Because u will never found diffrent (0,0) points in same line !