Data Structures MCQs (Part-1)

What is an array in data structures?

A Graph
B Collection
C Linear
D Tree

Which data structure follows Last In First Out (LIFO) principle?

A Stack
B Array
C Queue
D Tree

What does the term “heap” refer to in data structures?

A Binary Tree
B Priority Queue
C Linked List
D Tree

Which operation is not supported by a queue data structure?

A Peek
B Enqueue
C Dequeue
D Random Access

What is a binary search tree (BST)?

A Directed Graph
B Binary Tree with ordered nodes
C Doubly Linked List
D Balanced Tree

Which of the following is a key characteristic of a Disjoint Set Union (DSU) structure?

A Only supports find operations
B Stores elements in a tree
C Supports both union and find operations
D Supports only union operations

Which data structure is used to efficiently implement the union-find algorithm in network connectivity?

A Disjoint Set Union (DSU)
B Stack
C Linked List
D Array

Which of the following is a feature of a Fenwick Tree (Binary Indexed Tree)?

A Supports only range updates
B Uses more memory than segment trees
C Supports arbitrary range queries
D Supports range queries and point updates

What is the key advantage of using dynamic memory allocation in programming?

A Improved code readability
B Faster execution
C Better space management
D Fixed size allocation

In which situation would you use a Skip List over a regular linked list?

A When memory usage is not a concern
B For faster search, insertion, and deletion
C For better memory utilization
D For faster insertion of elements

What is the main drawback of using a Bloom Filter?

A False positives
B High memory consumption
C Fixed size
D It cannot be resized

Which of the following is a key application of Suffix Trees in string processing?

A Sorting data
B Finding the longest repeated substring
C Efficiently searching for patterns
D Counting occurrences of a substring

What is the main disadvantage of using a segment tree?

A High space complexity
B Inefficient for dynamic data
C Slow updates
D Slow queries

What is the main advantage of using a Trie over a hash table for storing strings?

A Fixed size
B Supports prefix queries
C Efficient memory usage
D Faster search

Which of the following data structures is ideal for implementing a set in a programming language with fast lookups and insertions?

A Queue
B Array
C Linked List
D Hash Table