I need an example of the shortest path of a directed cyclic graph from one node
(it should reach to all nodes of the graph from a node that will be the input).
For non weighted graph, BFS will do the job. Since there is potential cycle in your graph, you need to keep track of visited node (you sort of need to do this for BFS anyway).
For weighted graph, bellman–Ford algorithm can be used. It is also able to detect cycles.