Problems > Closed Walks on K5 > Editorial

Closed Walks on K5 — Solution & Editorial

Back to the Problem

The (1,1) entry of the adjacency matrix's N-th power. Matrix exponentiation in O(V³ log N).

Complexity: O(V3 log N)