Data Structures MCQs With Solutions
Data Structures MCQs With Solutions
Solutions
1. 1. Which data structure uses LIFO order?
A) Queue
B) Linked List
C) Stack
D) Binary Tree
**Answer:** C) Stack
2. 2. What is the time complexity to search an element in a binary search tree (BST)?
A) O(n)
B) O(log n)
C) O(n^2)
D) O(1)
**Answer:** B) O(log n)
A) Queue
B) Stack
C) Linked List
D) Tree
**Answer:** B) Stack
6. 6. What is the time complexity of inserting an element at the beginning of a linked list?
A) O(1)
B) O(n)
C) O(log n)
D) O(n log n)
**Answer:** A) O(1)
7. 7. In which data structure are elements added at one end and removed from the other
end?
A) Stack
B) Queue
C) Binary Tree
D) Linked List
**Answer:** B) Queue
A) Selection Sort
B) Bubble Sort
C) Quick Sort
D) Merge Sort
A) Hash Table
B) Binary Search Tree
C) Queue
D) Stack
A) Stack
B) Queue
C) Array
D) Linked List
**Answer:** B) Queue