Added algorithms to detect cycle in a graph.