For the graph without cycle(i.e acyclic graph), it will be easy. All the nodes without incoming edges will be an optimal solution. Since all other nodes should be reachable from one of the nodes.
For the graph with cycle, find strongly connected component first, then you get a acyclic graph. The method above works again.