Skip to content

Commit bb7e20c

Browse files
authored
Update Solution.java
1 parent e8f334f commit bb7e20c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class Solution {
22
public int[][] kClosest(int[][] points, int k) {
3-
Arrays.sort(points, (p1, p2) -> Math.hypot(p1[0], p1[1]) - Math.hypot(p2[0], p2[1]) > 0 ? 1 : -1);
3+
Arrays.sort(
4+
points, (p1, p2) -> Math.hypot(p1[0], p1[1]) - Math.hypot(p2[0], p2[1]) > 0 ? 1 : -1);
45
return Arrays.copyOfRange(points, 0, k);
56
}
67
}

0 commit comments

Comments
 (0)