@FSR291222A & FSR291222B :- DSA Advanced Practice Quiz!

Hello Everyone!

Here I am having some interesting Quiz!

Please reply your answer. If you are having any doubts means please feel free to ask and post it under this thread.
Have a Happy Weekend with Learning! :grinning: :grinning:

1.Which data structure follows the Last-In-First-Out (LIFO) principle?
a) Queue
b) Stack
c) Heap
d) Linked List
2.Which sorting algorithm has the worst-case time complexity of O(n^2)?
a) Quick Sort
b) Merge Sort
c) Insertion Sort
d) Heap Sort
3.What is the time complexity of performing a linear search in an unsorted array?
a) O(1)
b) O(log n)
c) O(n)
d) O(n^2)
4.In JavaScript, which built-in data structure is commonly used to implement a queue?
a) Array
b) Stack
c) Set
d) Map
5.Which data structure is used to efficiently store a collection of key-value pairs with fast insertion, deletion, and retrieval?
a) Array
b) Stack
c) Queue
d) Hash Table
6.Which data structure is typically used to implement a graph?
a) Array
b) Stack
c) Queue
d) Adjacency List
7.Which sorting algorithm is not a comparison-based sorting algorithm?
a) Quick Sort
b) Merge Sort
c) Radix Sort
d) Insertion Sort
8.Which data structure provides constant-time insertion, deletion, and retrieval of the minimum and maximum elements?
a) Stack
b) Queue
c) Heap
d) Binary Search Tree
9.What is the time complexity of searching for an element in a binary search tree (BST) in the worst case?
a) O(1)
b) O(log n)
c) O(n)
d) O(n^2)
10.Which algorithm is used to find the shortest path in a weighted graph with non-negative edge weights?
a) Dijkstra's algorithm
b) Breadth-First Search (BFS)
c) Depth-First Search (DFS)
d) Bellman-Ford algorithm

Thank & Reagrds
Dharshini.M