Start learning 50% faster. Sign in now
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.
निम्नलिखित में से बाध्य मितव्ययिता शब्द का वित्तीय श�...
दिए गए विकल्पों में से वह वाक्य चुने जो प्रश्न में दिए �...
परित्याग का अंग्रेजी शब्द है -
दिए गए प्रत्येक प्रश्न में एक हिंदी का वाक्य दिया गया �...
निम्नलिखित विकल्पों में से आस्थगन का पर्याय होगा।
दिए गए अंग्रेजी शब्दों के लिए एक हिन्दी पर्याय का चयन कीजि...
बुनियादी सुविधाएं देने के लिए दिशा निर्देश तैयार किए गए ह�...
Choose the Hindi word closest in meaning to the following English words :
Relevance
निम्नलिखित विकल्पों में से खुदरा कीमत शब्द का पर्या�...
निम्नलिखित में शिकायती शब्द का इनमे से क्या अर्थ नही�...