We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d0c934 commit c768893Copy full SHA for c768893
kth-largest-element-in-a-stream/index.ts
@@ -3,7 +3,7 @@ import { PriorityQueue } from "./PriorityQueue.ts";
3
interface KthLargest {
4
add(val: number): number;
5
}
6
-function KthLargest(k: number, nums: number[]) {
+function KthLargest(k: number, nums: number[]): KthLargest {
7
//降序排列
8
const minheap = PriorityQueue<number>((a, b) => -a + b, nums);
9
//
0 commit comments