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@v0.8.1/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
tail: () => T | undefined
pop: () => T | undefined
shift: () => T | undefined

Methods

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

Type Parameters

optional
T = any

Parameters

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