K Closest Points to Origin
TikTok Interview Question
Problem Overview
Difficulty: Medium
LeetCode Pattern: Heap
Given an array of points where points[i] = [xi, yi] and an integer k, return the k closest points to the origin (0, 0).
Note: Euclidean Distance To Origin = √(x² + y²)
Input:
· points = [[1,3],[-2,2]]
· k = 1
Output:
· [[-2,2]]
Explanation:
· [1,3] dist to origin = √10
· [-2,2] dist to origin = √…


