min_max_heap library
Dart implementation of Min-max binary heap data structure. Supports generics.
Classes
-
MinMaxHeap<
E extends Object> - Min-max heap is a variation of the traditional binary heap, a 'double-ended priority queue', where the elements are organized following the 2 properties of a binary heaps:
Functions
-
getSubtreeOf(
{required int index, required List< Object> atList}) → Iterable<Object> -
A utility Function to get an Iterable with all elements present
in a subtree of an element at
index
inatList
. -
isValidMinMaxHeapListView(
List< Object> list, [num criteria(Object element)?]) → bool -
An utility function to check if an
list
is a valid list representation of a min-max heap.