'Algorithm to determine whether all points are not Source points by attaching a direction to each edge

Given an undirected graph G(V,E), design an algorithm to determine whether all points are not Source points by attaching a direction to each edge (Note that the Source point means the point does not have any incoming edges) eg.enter image description here

How to design an algorithm to determine whether all points are not Source points by attaching a direction to each edge?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source