code for Max Points on a Line