Question 31
A graph traversal technique that uses a Stack or recursion is -
DFS explores deeply along each branch before backtracking, naturally implemented using a LIFO Stack or recursive calls.
A graph traversal technique that uses a Stack or recursion is -
DFS explores deeply along each branch before backtracking, naturally implemented using a LIFO Stack or recursive calls.
Dijkstra's Algorithm is used for finding -
Dijkstra's algorithm computes shortest-path distances from one source to all reachable vertices. Its greedy choice is correct when all edge weights are non-negative; negative edges can invalidate the algorithm.
Which of the following algorithms is used to find a Minimum Spanning Tree (MST) of a weighted graph?
Prim's algorithm constructs a minimum spanning tree by repeatedly adding the lightest edge connecting the current tree to a vertex outside it. Kruskal's algorithm is another MST algorithm, but it is not among the listed options.
What is a Max-Heap?
In a Max-Heap, every parent node satisfies the heap property: parent key >= child keys, making the root element the maximum item.
Which hash collision resolution strategy handles collisions by storing overflowing keys in linked lists at each bucket?
Separate Chaining maintains an auxiliary linked list at each hash table slot to store all colliding keys that hash to the same bucket index.