Max Points on a Line
Return the maximum number of points that lie on the same straight line.
Examples
Input: [[1,1],[2,2],[3,3]]
Output: 3
Input: [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]
Output: 4
Hints
Use a hash map to store the count of points sharing the same slope with respect to a fixed point.
For vertical lines (infinite slope), handle them separately by checking if x-coordinates are equal.
Optimize by skipping duplicate points and only considering unique points for slope calculations.
Related Problems
Max Points on a Line
Return the maximum number of points that lie on the same straight line.