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

Lines changed: 3 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy