Question: In a priority queue implemented with a binary heap, what is the time complexity of inserting an element?
Options:
Correct Answer: O(log n)
Solution:
Inserting an element into a priority queue implemented with a binary heap has a time complexity of O(log n) due to the need to maintain the heap property.