Implementation of a min heap allowing for a comparator to be provided so that the heap may contain objects that involve a more complex comparison. This constructor constructs a MinHeap instance and takes two optional parameters: an array and comparator. If the array is provided, it will be used as the backing store for the heap. Therefore, all operations on the heap will be reflected in the provided array.
For javascript docs, visit the project page.