Meaning of points of the same line?


  • 0
    K

    The output for [[0,0],[1,1],[1,-1]] is 2.

    I donot understand how the output is 2. 2 points always form a line. So you need 3 points to see if they are on the same line. But, the given 3 points are not on a straight line. Does the question actually mean how many points have the same slope?


Log in to reply
 

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