rewrite leetcode max points in a line