Which best describes how Kruskal’s algorithm constructs a Minimum Spanning Tree (MST)?
Adds edges in increasing order of weight while avoiding cycles.
Adds the smallest edge that connects a visited vertex to an unvisited one.
Grows the MST by adding the maximum weight edge from a starting node.
Selects a root and grows the MST by always choosing the closest neighbour.
[ Option A ]
Kruskal’s algorithm is a greedy algorithm used to find the Minimum Spanning Tree (MST) of a connected, weighted graph. It works by sorting all the edges of the graph in non-decreasing order of their weights. Then, it iteratively adds the smallest edge to the MST, provided that adding the edge does not create a cycle in the growing tree.
The algorithm continues until the MST has exactly V−1 edges, where V is the number of vertices.
Unlike Prim’s algorithm, which grows the MST from a starting vertex, Kruskal’s algorithm builds the MST by focusing on edges first, ensuring the final tree has the minimum total weight.
Must Know:
Non-decreasing order of their weight means the edges are arranged from smallest weight to largest weight, but equal weights are allowed to appear next to each other. For example, if the edge weights are [6, 2, 9, 4, 2], then sorted in non-decreasing order they become [2, 2, 4, 6, 9].
Which of the following TREE traversal technique is NOT based on Depth First Search (DFS)?
Level Order Traversal
Preorder Traversal
Inorder Traversal
Postorder Traversal
[ Option A ]
The Level Order Traversal also known as Breadth First Search (BFS) while other three are DFS.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.