Question: What is the time complexity of inserting an element into a binary heap used as a priority queue?
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.