Insertion of each element individually is O(log n), for a plain heap. A Fibonacci heap does inserts in O(1), and get/delete-min's in O(log n) amortized time, but at the cost of being pretty tricky to implement correctly, though there are modules to help with that.
But to your point, yes, each insert is O(log n).
Dave
In reply to Re^4: getting the highest value in a simpler way
by davido
in thread getting the highest value in a simpler way
by replicant4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |