logo
Problems

Max Points on a Line

Problem

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

Traps

Double comparison: use == to compare double values may result in wrong answer

Online Judge