Question
Which traversal method is most suitable for finding
connected components in an undirected graph?Solution
Depth-First Search (DFS) is ideal for finding connected components in an undirected graph. Starting from an unvisited vertex, DFS explores all reachable vertices, marking them as visited. Each DFS call identifies one connected component, and the process is repeated for all unvisited vertices. Steps: 1. Initialize all vertices as unvisited. 2. Perform DFS from each unvisited vertex. 3. Each DFS traversal marks a connected component. DFS is efficient, with a time complexity of O(V+E), making it well-suited for sparse and dense graphs. Why Other Options Are Incorrect: 1. BFS: Can also find connected components but requires more memory due to queue-based implementation. 2. Topological Sort: Applies to Directed Acyclic Graphs (DAGs) and does not determine connected components. 3. Dijkstra’s Algorithm: Finds shortest paths, not connected components. 4. Floyd-Warshall Algorithm: Computes all-pairs shortest paths, unsuitable for this task.
Person with independent or unorthodox views
Induce
Match the blanks in List-I with the Prepositions in List-II :
Select the most appropriate meaning of the word  which is opposite to the one marked in bold letters according the context in which it has been used. ...
VAUNTÂ
Mendicant
In each of the following questions, three out of four words given have the same meaning. Mark the number as your answer which is different in meaning fr...
- In each of the following questions, a pair of words is given. This pair is followed by four other pairs, one of which has a relationship most similar to th...
DEMEAN
In each of the following questions, three out of four words given have the same meaning. Mark the number as your answer  which is different in meanin...