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