Skip to content

Commit c768893

Browse files
committed
Update index.ts
1 parent 1d0c934 commit c768893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kth-largest-element-in-a-stream/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PriorityQueue } from "./PriorityQueue.ts";
33
interface KthLargest {
44
add(val: number): number;
55
}
6-
function KthLargest(k: number, nums: number[]) {
6+
function KthLargest(k: number, nums: number[]): KthLargest {
77
//降序排列
88
const minheap = PriorityQueue<number>((a, b) => -a + b, nums);
99
//

0 commit comments

Comments
 (0)