Data Structures MCQs (Part-4)

Which data structure is typically used to implement breadth-first search (BFS) in a graph?

A Array
B Stack
C Queue
D Linked List

Which of the following is a characteristic of a binary search tree (BST)?

A Nodes have at most two children
B Each node stores multiple values
C Unordered structure
D Allows cycles

Which tree type maintains a balance by enforcing constraints on its nodes?

A B-Tree
B AVL Tree
C Red-Black Tree
D Binary Tree

What is the primary purpose of a hash table in computer science?

A To represent hierarchical relationships
B To store data dynamically
C To store data in an unordered manner for fast access
D To store elements in order

Which of these is not an example of a balanced binary search tree?

A Binary Tree
B AVL Tree
C Red-Black Tree
D B-Tree

In which of the following scenarios would a priority queue be useful?

A Sorting a list of items
B Handling elements based on priority
C Managing function calls in recursion
D Storing large datasets

What is the worst-case time complexity of quicksort?

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

What does a min-heap property ensure?

A The root contains the minimum element
B Each node is larger than its children
C The tree is perfectly balanced
D The root contains the maximum element

What is the main feature of a circular linked list?

A Elements are sorted
B Last node points to the first node
C Nodes have two pointers
D List has a fixed size

What is the purpose of the depth-first search (DFS) algorithm in graph theory?

A To find the shortest path
B To check for cycles
C To visit all nodes by exploring as deep as possible
D To find the maximum node value

Which data structure is used for efficient dynamic memory allocation?

A Linked List
B Hash Table
C Queue
D Stack

Which of the following sorting algorithms is in-place?

A Bubble Sort
B Quick Sort
C Merge Sort
D Radix Sort

Which type of data structure is used to implement recursion?

A Array
B Tree
C Stack
D Linked List

Which of the following trees allows for efficient insertion, deletion, and search operations with a logarithmic time complexity?

A AVL Tree
B Red-Black Tree
C B-Tree
D All of the above

Which of the following graph traversal algorithms uses a queue?

A Dijkstra’s Algorithm
B Depth-First Search
C Bellman-Ford Algorithm
D Breadth-First Search