LeetCode – Max Points on a Line (Java)
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Analysis This problem can be solve by counting points that have the same slope for each point. When counting, we need to be careful about the duplicate points and points on the vertical lines. Java … Read more