set-3
101. What type of sorting algorithm is the radix sort algorithm?
Non-comparison based
Comparison based
Logarithmic
Exponential
102. Which sorting algorithm is used to sort arrays in place?
Merge sort
Quick sort
Insertion sort
Bubble sort
103. What is the time complexity of the shell sort algorithm in the average case?
104. The time complexity of Insertion Sort is:
105. The time complexity of Merge Sort is:
106. The time complexity of Quick Sort is:
107. The time complexity of Heap Sort is:
108. The time complexity of Bubble Sort is:
109. Which sorting algorithm is used to sort linked lists?
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
110. Which sorting algorithm is used for sorting large data sets?
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
111. Which sorting algorithm is used for sorting arrays with random order?
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
112. Which sorting algorithm is used for sorting arrays with sorted or nearly sorted data?
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
113. Which sorting algorithm is used for sorting arrays with a large number of elements?
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
114. Which of the following sorting algorithms is considered to be the fastest for small data sets?
Bubble sort
Insertion sort
Quick sort
Merge sort
115. Which of the following sorting algorithms is a divide-and-conquer algorithm?
Bubble sort
Insertion sort
Quick sort
Merge sort
116. Which of the following sorting algorithms has the best average case time complexity?
Bubble sort
Insertion sort
Quick sort
Merge sort
117. Which of the following sorting algorithms has a worst case time complexity of ?
Bubble sort
Insertion sort
Quick sort
Merge sort
118. Which of the following sorting algorithms is an in-place sorting algorithm?
Bubble sort
Insertion sort
Quick sort
Merge sort
119. Which of the following sorting algorithms has the best space complexity?
Bubble sort
Insertion sort
Quick sort
Merge sort
120. Which of the following sorting algorithms is suitable for sorting linked lists?
Bubble sort
Insertion sort
Quick sort
Merge sort
121. Which of the following sorting algorithms is used for sorting data in a specialized manner like sorting data in a particular range or sorting data by a specific field?
Bubble sort
Insertion sort
Quick sort
Radix sort
122. What is the time complexity of linear search?
123. What is the time complexity of binary search?
124. What is the main advantage of using binary search over linear search?
More efficient in large data sets
Can be used only on sorted data sets
Can only be used on unsorted data sets
Not as efficient as linear search in small data sets
125. What is the basic idea behind linear search?
To search for an element by comparing it with every element in the data set
To search for an element by dividing the data set into two parts and comparing the target element with the middle element
To search for an element by comparing it with the first and last elements of the data set
To search for an element by comparing it with the last element of the data set
126. What is the basic idea behind binary search?
To search for an element by comparing it with every element in the data set
To search for an element by dividing the data set into two parts and comparing the target element with the middle element
To search for an element by comparing it with the first and last elements of the data set
To search for an element by comparing it with the last element of the data set
127. What is the best case time complexity of binary search?
128. What is the worst case time complexity of binary search?
129. What type of data set is required to perform binary search?
Unsorted data set
Sorted data set
Randomly ordered data set
Any type of data set
130. What is the main disadvantage of using linear search over binary search?
More efficient in large data sets
Can be used only on sorted data sets
Not as efficient as binary search in large data sets
Can only be used on unsorted data sets
131. Which of the following is faster, linear search or binary search?
Linear search
Binary search
Both are equally fast
It depends on the size of the data set
132. What is the purpose of a hash function in a hash table?
To convert a key into an index for the table
To sort the elements in the table
To compare elements in the table
To store the elements in the table
133. What is a hash table in computer science?
A data structure that stores elements in a sorted manner
A data structure that stores elements in a random order
A data structure that stores elements using a key-value pair
A data structure that stores elements using an array
134. What is collision resolution in hash tables?
The process of adding elements to a hash table
The process of removing elements from a hash table
The process of resolving conflicts when two keys hash to the same index
The process of searching for a specific element in a hash table
135. What are some common collision resolution techniques in hash tables?
Linear probing
Binary search
Chaining
All of the above
136. What is the time complexity of searching in a hash table using chaining?
137. What is the main purpose of a hash function in a hash table?
To sort the elements in the table
To find the index of an element in the table
To compare the elements in the table
To store the elements in the table
138. What is the most common way to resolve collisions in a hash table?
Chaining
Open Addressing
Binary Search
Linear Search
139. What is the time complexity of searching an element in a hash table using the hash function?
140. What is the main advantage of using a hash table over a traditional array for storing elements?
Faster access time
Better sorting
More memory efficient
Better searching
141. What is the purpose of a collision resolution technique in a hash table?
To ensure that each element is stored at a unique index in the table
To sort the elements in the table
To compare the elements in the table
To store the elements in the table
142. What is the main objective of a minimum spanning tree algorithm?
To find the shortest path between two vertices
To find the minimum weight of a tree that connects all vertices
To find the longest path between two vertices
To find the maximum weight of a tree that connects all vertices
143. What is the time complexity of Prim's algorithm for finding a minimum spanning tree?
144. What is the time complexity of Kruskal's algorithm for finding a minimum spanning tree?
145. What is the difference between Prim's and Kruskal's algorithm for finding a minimum spanning tree?
Prim's algorithm starts with a single vertex and adds vertices to the tree while Kruskal's algorithm starts with all vertices and adds edges to the tree.
Prim's algorithm starts with all vertices and adds edges to the tree while Kruskal's algorithm starts with a single vertex and adds vertices to the tree.
Both algorithms start with a single vertex and add edges to the tree.
Both algorithms start with all vertices and add vertices to the tree.
146. What is the Round-Robin algorithm used for?
To find the minimum spanning tree
To schedule processes in a computer system
To sort a list of elements
To find the longest path between two vertices
147. What is the main advantage of using a minimum spanning tree algorithm?
To find the shortest path between two vertices
To find the minimum weight of a tree that connects all vertices
To find the longest path between two vertices
To find the maximum weight of a tree that connects all vertices
148. What is the use of a Round-Robin algorithm in a computer system?
To find the minimum spanning tree
To schedule processes in a computer system
To sort a list of elements
To find the longest path between two vertices
149. What is the main disadvantage of using a Kruskal's algorithm compared to Prim's algorithm for finding a minimum spanning tree?
Kruskal's algorithm is less efficient than Prim's algorithm
Kruskal's algorithm is more difficult to implement than Prim's algorithm
Kruskal's algorithm is less reliable than Prim's algorithm
Kruskal's algorithm is less accurate than Prim's algorithm
150. What is the use of a hash function in a hash table data structure?
To generate a unique key for each element in the table
To sort the elements in the table
To find the shortest path between two vertices
To find the longest path between two vertices
Last updated