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?