Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface PriorityQueue
import { type PriorityQueue } from "https://deno.land/x/masx200_leetcode_test@10.2.0/kth-largest-element-in-a-stream/PriorityQueue.ts";

Type Parameters

optional
T = any

Properties

clear: () => void
length: () => number
comparator: (a: T, b: T) => number
offer: (value: T) => void
head: () => T | undefined
shift: () => T | undefined

Methods

isEmpty(): boolean
toArray(): T[]
function PriorityQueue
import { PriorityQueue } from "https://deno.land/x/masx200_leetcode_test@10.2.0/kth-largest-element-in-a-stream/PriorityQueue.ts";

Type Parameters

optional
T = any

Parameters

comparator: (a: T, b: T) => number
optional
values: T[]