Data Structures MCQs (Part-6)

What is the primary advantage of a B-Tree over a binary search tree?

A Self-balancing
B Better space utilization
C Support for more data
D Faster search

Which operation is performed by a heap to ensure the heap property is maintained after insertion?

A Sifting
B Sorting
C Traversing
D Merging

Which of the following is true about a max-heap?

A The root node is the smallest
B It is unordered
C The root node is the largest
D All elements are equal

What is the time complexity of deleting the root node in a max-heap?

A O(n log n)
B O(n)
C O(n²)
D O(log n)

Which of the following best describes the structure of a B-Tree?

A Multi-level tree with ordered nodes
B Linked list with a root node
C Single-level tree with multiple roots
D Binary search tree with balanced nodes

In a priority queue, which element is removed first?

A Latest element added
B Highest priority element
C Random element
D First element inserted

Which of the following is a feature of a Fibonacci heap?

A Constant time for insertions
B Logarithmic time for all operations
C No need for rebalancing
D Constant time for insertions

Which of the following algorithms is commonly used with heaps to find the k-th largest element in a stream of data?

A Quick Sort
B Heap Sort
C Priority Queue
D Merge Sort

Which of the following best describes the operation of a binary heap?

A The heap property ensures a complete binary tree
B The tree is fully balanced
C Each node can have multiple children
D The root is always at the bottom

What is the time complexity for building a heap from an unsorted array?

A O(n log n)
B O(n)
C O(n²)
D O(log n)

Which type of B-Tree is most commonly used in database indexing systems?

A 2-3-4 Tree
B Red-Black Tree
C B+ Tree
D 2-3 Tree

In a Fibonacci heap, which operation is most efficient?

A Merging heaps
B Insertion
C Decrease key
D Deletion of minimum element

Which of the following is true for a binary heap?

A It always requires rebalancing after every operation
B It can be a max-heap or a min-heap
C Its nodes must be balanced
D It is not a complete binary tree

In which of the following situations is a heap most useful?

A Storing a collection of ordered elements
B Sorting a list of numbers
C Storing and retrieving elements by priority
D Performing range queries

Which property must be satisfied by a B-Tree?

A It is always a complete tree
B The tree must be balanced after every insertion
C Nodes contain only one key
D All leaf nodes are at the same depth