ComparatorHeap

class ComparatorHeap<T>(comparator: Comparator<T>) : AbstractHeap<T>

Constructors

Link copied to clipboard
constructor(comparator: Comparator<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val count: Int
Link copied to clipboard
Link copied to clipboard
open val isEmpty: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
open override fun compare(first: T, second: T): Int
Link copied to clipboard
open override fun getNthSmallestT(n: T): T?
Link copied to clipboard
open override fun insert(element: T)
Link copied to clipboard
open override fun isMinHeap(): Boolean
Link copied to clipboard
open override fun merge(heap: AbstractHeap<T>)
Link copied to clipboard
open override fun peek(): T?
Link copied to clipboard
open override fun remove(): T?
Link copied to clipboard
open override fun removeAt(index: Int): T?