MaxHeap<T extends Comparable> class

Implemented types

Constructors

MaxHeap()

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setteroverride
length int
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setteroverride

Methods

heapify(List<T> values) → void
Build heap from a list in O(n)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() → T?
Peek the largest element without removing it
override
pop() → T?
Remove and return the largest element
override
printHeap() String
override
push(T value) → void
Insert a value into the heap
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited