I have a directed graph i.e matrix of order n x n.
I need to find all the cycles present in it along with the vertices involved in the cycle.
Here is an example:
A B C D
0 1 1 1
1 0 1 0
1 0 0 0
1 0 0 0
The output should be similar to:
No.of cycles found : 4
A->B->A
A->B->C->A
A->C->A
A->D->A