There is no easy answer to this question.
A binary heap insertion will have average complexity of O(1)
and worst-case of O(log N)
. The complexity will remain within that bound regardless of k
, but the actual time taken to complete the operation (not time complexity; I believe you might be confusing the terms) will depend on the implementation, platform, and the way the wind is blowing.
The closes thing to a concrete answer in terms of time is that the time taken to insert k
elements at best be linearly proportional to k
and at worst proportional to log (x)
integrated from N
to k+N
. For N
significantly larger than k
we can approximate the time taken to proportional to k log N
.
For more info see: http://en.wikipedia.org/wiki/Binary_heap