Q. What is the primary advantage of using a binary heap in priority queue implementations?
A.
Faster insertion
B.
Faster deletion of the minimum element
C.
Better memory usage
D.
Easier implementation
Solution
Binary heaps provide O(log n) time complexity for both insertion and deletion of the minimum element, making them efficient for priority queue operations.
Correct Answer:
B
— Faster deletion of the minimum element
Q. Which of the following is a real-world application of binary trees in computer science?
A.
Database indexing
B.
Image processing
C.
Network routing
D.
All of the above
Solution
Binary trees are used in various applications including database indexing (B-trees), image processing (quadtree), and network routing (routing tables).