Skip to content

Commit 24df592

Browse files
fix build
1 parent dd1f14b commit 24df592

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/_703.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ public class _703 {
3030
public static class Solution1 {
3131
public static class KthLargest {
3232
PriorityQueue<Integer> heap;
33-
int K;
33+
int maxK;
3434

3535
public KthLargest(int k, int[] nums) {
3636
heap = new PriorityQueue<>(Collections.reverseOrder());
3737
for (int num : nums) {
3838
heap.offer(num);
3939
}
40-
K = k;
40+
maxK = k;
4141
}
4242

4343
public int add(int val) {
4444
List<Integer> tmp = new ArrayList<>();
4545
int result = 0;
46-
int tmpK = K;
46+
int tmpK = maxK;
4747
heap.offer(val);
4848
while (tmpK-- > 0) {
4949
result = heap.poll();

0 commit comments

Comments
 (0)