Apple SDE ll Interview Question 2024-January | Computational Geometry | Off-campus

Question · Posted Jun 2026

Question 1: Max Points on a Line Problem Statement Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum number of points that lie on the exact same straight line. Constraints 1 <= points.length <= 300 points[i].length == 2 -104 <= xi, yi <= 104 All the points are strictly unique. Example Input: points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] Output: 4 Explanation: The points [1,1], [2,2], [3,3], and [4,4] (if plotted) would all ...

The full answer & interview discussion are available to premium members.

Log in Create a free account