MicroStrategy Interview Question

max points on a line from leetcode