---
title: "Discussion on \"Directed Graph Cycle (DFS | BFS)\" | Hashnode"
description: "Discussion on \"Directed Graph Cycle (DFS | BFS)\". Problem\nGiven a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, check whether it contains any cycle or not.The graph is represented as a 2D vector edges[][], where each entry edges[i] = [u, v] denotes an edge from verticex u to v..."
url: "https://hashnode.com/posts/directed-graph-cycle-dfs-bfs/68ab59fd4e241467fd1b0be6"
---

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

Discussion

# [Directed Graph Cycle (DFS | BFS)](https://chetan77.hashnode.dev/directed-graph-cycle-dfs-bfs?utm_source=hashnode&utm_medium=feed)

Problem Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, check whether it contains any cycle or not.The graph is represented as a 2D vector edges\[\]\[\], where each entry edges\[i\] = \[u, v\] denotes an edge from verticex u to v...

Aug 24, 2025 · 2 min read · chetan77.hashnode.dev  
Read the article

-   [#directed-graph-cycle-dfs-bfs](https://hashnode.com/tag/directed-graph-cycle-dfs-bfs)
-   [#cycle-detection](https://hashnode.com/tag/cycle-detection)
-   [#graphs](https://hashnode.com/tag/graphs)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

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

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
