Which sorting algorithm has a worst-case time complexity of O(n^2)?
a. Bubble Sort
b. Merge Sort
c. Quick Sort
d. Insertion Sort -
ANSWER :
Bubble Sort
Which data structure follows the "First-In-First-Out" (FIFO) principle?
a. Stack
b. Queue
c. Linked List
d. Tree -
ANSWER :
Queue
In a binary search tree (BST), what is the property of the left child compared to the parent
node?
a. It is greater than the parent node.
b. It is less than the parent node.
c. It is equal to the parent node.
d. There is no specific relationship. -
ANSWER :
It is less than the parent node.
1
, Which data structure provides constant-time average-case insertion, deletion, and retrieval
operations?
a. Array
b. Linked List
c. Hash Table
d. Stack -
ANSWER :
Hash Table
Which algorithm is used to find the shortest path between nodes in a graph? a. Breadth-First
Search (BFS)
b. Depth-First Search (DFS)
c. Dijkstra's Algorithm
d. Bellman-Ford Algorithm -
ANSWER :
Dijkstra's Algorithm
Which data structure uses the "Last-In-First-Out" (LIFO) principle?
a. Queue
b. Heap
c. Stack
d. Hash Table -
ANSWER :
Stack
Which sorting algorithm has the best average-case time complexity?
a. Bubble Sort
2
a. Bubble Sort
b. Merge Sort
c. Quick Sort
d. Insertion Sort -
ANSWER :
Bubble Sort
Which data structure follows the "First-In-First-Out" (FIFO) principle?
a. Stack
b. Queue
c. Linked List
d. Tree -
ANSWER :
Queue
In a binary search tree (BST), what is the property of the left child compared to the parent
node?
a. It is greater than the parent node.
b. It is less than the parent node.
c. It is equal to the parent node.
d. There is no specific relationship. -
ANSWER :
It is less than the parent node.
1
, Which data structure provides constant-time average-case insertion, deletion, and retrieval
operations?
a. Array
b. Linked List
c. Hash Table
d. Stack -
ANSWER :
Hash Table
Which algorithm is used to find the shortest path between nodes in a graph? a. Breadth-First
Search (BFS)
b. Depth-First Search (DFS)
c. Dijkstra's Algorithm
d. Bellman-Ford Algorithm -
ANSWER :
Dijkstra's Algorithm
Which data structure uses the "Last-In-First-Out" (LIFO) principle?
a. Queue
b. Heap
c. Stack
d. Hash Table -
ANSWER :
Stack
Which sorting algorithm has the best average-case time complexity?
a. Bubble Sort
2