Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite11d2ba

Browse files
refactor 973
1 parent99d368e commite11d2ba

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
publicclass_973 {
66

77
publicstaticclassSolution1 {
8-
publicint[][]kClosest(int[][]points,intK) {
9-
int[][]ans =newint[K][2];
8+
publicint[][]kClosest(int[][]points,intk) {
9+
int[][]ans =newint[k][2];
1010

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp