Problem 1169. Count the Number of Directed Cycles in a Graph
Given an asymmetric adjacency matrix, determine the number of unique directed cycles.
For example, the graph represented by adjacency matrix
has 7 cycles. They are:
The input is an adjacency matrix of 0s and 1s, and the output should be the number of unique (simple) directed cycles in the graph.
Solution CommentsShow comments
Problem Recent Solvers11