Here is an exercise in the Algorithm Design Manual.
Consider the problem of determining whether a given undirected graph G = (V, E) contains a triangle
I really like the matrix multiplication solution discussed in this blog post.
Let a = the adjacency matrix
The problem is, matrix multiplication is slow... However, you can use GPGPU to perform matrix multiplication and can have a performant solution on modern architectures that include a GPU.