Kumar-laxmi / Algorithms

A Repository for algorithms in C, C++, Python and Java
Apache License 2.0
310 stars 372 forks source link

Kosaraju Algorithm in C, Java and Python #1456

Closed Kumar-laxmi closed 2 months ago

Kumar-laxmi commented 1 year ago

Feature = Kosaraju Algorithm

Kosaraju's algorithm is a graph algorithm used to find strongly connected components (SCCs) in a directed graph. A strongly connected component is a subset of vertices in a graph where there is a path between any two vertices within the subset. The algorithm addresses the problem of identifying these strongly connected components.

Approach :

Kosaraju's algorithm utilizes depth-first search (DFS) and a two-pass approach to find strongly connected components in a directed graph. It performs the following steps:

1 First Pass (DFS):

  1. Graph Transposition:

    • Transpose the original graph by reversing the direction of all edges.
    • This creates a new graph with the same vertices but with reversed edges.
  2. Second Pass (DFS on Transposed Graph):

Additional context image

tarunvyshnav777 commented 1 year ago

@Kumar-laxmi kindly assign this to me under SSOC'23

Devchawla2608 commented 1 year ago

@Kumar-laxmi please assign this to me under SSOC'23. I'm ready to contribute in all 4 languages

shanvijha30 commented 1 year ago

@Kumar-laxmi I would like to work on this issue could you please assign it to me. Thank you!

Mrudula1205 commented 1 year ago

@Kumar-laxmi I would like to work on this issue. Please assign it to me under SSoC'23

Ashutoshbind15 commented 1 year ago

@Kumar-laxmi I would like to work on this under ssoc'23, Have also implemented it quite a few times. Haven't yet contributed to the algorithms repository this season.

Kumar-laxmi commented 1 year ago

Assigned! @shanvijha30 : C, Java & Python

github-actions[bot] commented 2 months ago

Stale issue message