Max Points on a Line

Note: Avoid duplicated calculation