The overall worst-case time complexity of building the min-heap and applying extract-min k times would be O(n + k log n).
The worst-case time complexity of building a min-heap from an array using the linear time build-heap algorithm is O(n). This operation ensures that the heap property is satisfied.
After building the min-heap, extracting the minimum element k times will take O(k log n) time complexity in the worst case. Each extraction involves removing the minimum element from the heap and potentially reorganizing the heap to maintain its properties.
So, the overall worst-case time complexity of building the min-heap and applying extract-min k times would be O(n + k log n).