---
title: "Discussion on \"DFS and BFS on a Single Graph\" | Hashnode"
description: "Discussion on \"DFS and BFS on a Single Graph\". BFS and DFS Algorithm on a single Graph\nTake an Example of the below Graph\n\nimport java.util.*;\n\npublic class Main {\n\n  public static class Graph {\n    int v;\n    int e;\n\n    List<List<Integer>> arrList;\n\n    public Graph(int v, int e) {\n      this.v..."
url: "https://hashnode.com/posts/dfs-and-bfs-on-a-single-graph/66fcd8aba5d4ecd39219e50c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [DFS and BFS on a Single Graph](https://akadurga.hashnode.dev/dfs-and-bfs-on-a-single-graph?utm_source=hashnode&utm_medium=feed)

BFS and DFS Algorithm on a single Graph Take an Example of the below Graph import java.util.\*; public class Main { public static class Graph { int v; int e; List<List<Integer>> arrList; public Graph(int v, int e) { this.v...

Oct 2, 2024 · 1 min read · akadurga.hashnode.dev  
Read the article

-   [#dfs](https://hashnode.com/tag/dfs)
-   [#bfs](https://hashnode.com/tag/bfs)
-   [#graphs](https://hashnode.com/tag/graphs)

## Written by

[Teja Illa](https://hashnode.com/@akaDurga)

@akaDurga

  
[View profile](https://hashnode.com/@akaDurga)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
