Skip to content

Commit e11d2ba

Browse files
refactor 973
1 parent 99d368e commit e11d2ba

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-3
lines changed

src/main/java/com/fishercoder/solutions/_973.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
public class _973 {
66

77
public static class Solution1 {
8-
public int[][] kClosest(int[][] points, int K) {
9-
int[][] ans = new int[K][2];
8+
public int[][] kClosest(int[][] points, int k) {
9+
int[][] ans = new int[k][2];
1010

1111
PriorityQueue<int[]> pq = new PriorityQueue<>((o1, o2) -> {
1212
double dist1 = getDistance(o1);
@@ -25,7 +25,7 @@ public int[][] kClosest(int[][] points, int K) {
2525
pq.add(point);
2626
}
2727

28-
for (int i = 0; i < K; i++) {
28+
for (int i = 0; i < k; i++) {
2929
ans[i] = pq.poll();
3030
}
3131

0 commit comments

Comments
 (0)