About 717,000 results
Open links in new tab
  1. BFS for Disconnected Graph - GeeksforGeeks

    Sep 14, 2023 · The Breadth First Search (BFS) algorithm is used to search a graph data structure for a node that meets a set of criteria. It starts at the root of the graph and visits all nodes at the current depth level before moving on to the nodes at the next depth level.

  2. BFS for Disconnected Graph - C# Corner

    This code implements breadth-first search (BFS) for disconnected graphs. It uses an adjacency list to represent the graph and provides methods for adding edges and performing BFS traversal. The constructor initializes the graph, the AddEdge method connects vertices, and the Bfs method traverses the graph in breadth-first order.

  3. Depth First Search or DFS for disconnected Graph

    Jun 13, 2023 · Given a Disconnected Graph, the task is to implement DFS or Depth First Search Algorithm for this Disconnected Graph. Example: Input: Output: 0 1 2 3. Algorithm for DFS on Disconnected Graph: In the post for Depth First Search for Graph, only the vertices reachable from a given source vertex can be visited.

  4. c# - Confusion regarding disconnected graph - Stack Overflow

    Jul 18, 2024 · I am learning graph data structure and want to understand how to handle this scenario. I have multiple directed graphs inside a .NET C# program like so: C<-A->B<-D E->F Here A points to B and C, D points to B and E points to F.

  5. Depth First Search or DFS for a Graph - GeeksforGeeks

    Mar 29, 2025 · DFS for Complete Traversal of Disconnected Undirected Graph. The above implementation takes a source as an input and prints only those vertices that are reachable from the source and would not print all vertices in case of disconnected graph.

  6. Graph Data Structure in C# - Learn Coding from Experts

    Sep 19, 2020 · In this article, we will implement a Graph Data Structure in C#. What is a Graph Data Structure? In the Graph data structure, each Node can be connected to many other Nodes. It can be compared with a road network. Many cities are connected with different routes. We call these routes as edges in Graph Data structure. Graph Data structure widely ...

  7. Understanding Disconnected Graphs in .NET C#: Handling …

    Jul 18, 2024 · In this article, we have learned about disconnected graphs and how to handle multiple directed graphs in .NET C#. We have also learned how to model directed graphs in .NET C# and how to find the connected components of a …

    Missing:

    • Data Structure

    Must include:

  8. Introduction to Graph Data Structure with Practical Examples

    Disconnected Graph: Disconnected graphs consist of two or more connected components, where there is no path between vertices in different components. Disconnected graphs may arise in scenarios where there are isolated clusters of vertices …

  9. Graphs and Dijkstra’s Algorithm (C#) - Bits and Pieces of Code

    Dec 22, 2015 · Graph Data structure A graph is an abstract data structure representation of connected nodes (also called vertices) by various edges (or the link/distance between nodes). Theres two kinds of graphs, directed and undirected.

  10. C# Graph Library - Working With Graph Data Structures

    Aug 31, 2015 · Data Structures. Once you see your problem as a Graph problem, you could choose to implement your own data structure to represent and work with that graph. How hard can it be? A list of nodes, A list of edges connecting some of …

  11. Some results have been removed
Refresh