Heap initialization utility MaxPriorityQueue.from
is O(N log N)
#66
Labels
enhancement
New feature or request
MaxPriorityQueue.from
is O(N log N)
#66
(Max|Min)PriorityQueue.from
static method naively constructs the heap one element at a time which takesO(N log N)
time (because each insertion is a log N operation.There is a better way to set it up when the incoming values are known at heap initialization time that runs in
O(N)
time.The text was updated successfully, but these errors were encountered: