kClosest = function(points, K) {
    const distance = ([x, y]) => (x * x) + (y * y); 

    points.sort((a, b) => distance(a) - distance(b));

    return points.slice(0, K);
}
https://leetcode.com/problems/k-closest-points-to-origin/
Time O(N * log(N)) | Space O(K)
@param {number[][]} points
@param {number} k
@return {number[][]}