Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Max Points on a Line

Given points in the plane, print the maximum number of points that lie on the same straight line.

Constraints

1 <= n <= 300 -10^4 <= x, y <= 10^4 All points are distinct

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.