Bipartite Graph in a Digraph How do you find a sub-digraph in a digraph such that the in degree and out degree of each vertex is 1. My professor told in the class that an algorithm can be build for it using bipartite matching but I have not able to do so. I am just looking for hints on how to proceed because I am kind of stuck on where to start.
Any simple cycle satisfies the conditions, so you can use any standard algorithm for finding cycles in a directed graph.

For example: decompose into strongly connected components.  Pick one component.  Start following an arbitrary walk through vertices within that component.  As soon as you hit a vertex the second time, you can construct a cycle.