import { type PriorityQueue } from "https://deno.land/x/masx200_leetcode_test@7.7.0/kth-largest-element-in-a-stream/PriorityQueue.ts";
Properties
comparator Function used to determine the order of the elements. It is expected to return a negative value if the head argument is less than the second argument, zero if they're equal, and a positive value otherwise.
offer: (value: T) => void
add one element
head: () => T | undefined
get min element
tail: () => T | undefined
get max element
pop: () => T | undefined
get and delete max element
shift: () => T | undefined
get and delete min element
import { PriorityQueue } from "https://deno.land/x/masx200_leetcode_test@7.7.0/kth-largest-element-in-a-stream/PriorityQueue.ts";
comparator Function used to determine the order of the elements. It is expected to return a negative value if the head argument is less than the second argument, zero if they're equal, and a positive value otherwise.