Adobe OA Question 2024 August | Heaps | on-campus

Adobe · Question · Posted Jun 2026

Question: K Closest Points to Origin Problem Statement Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0). The distance between two points on the X-Y plane is the Euclidean distance: √(x2 + y2). You may return the answer in any order. The answer is guaranteed to be unique (except for the order that it is in). Constraints 1 ...

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

Log in Create a free account