collection of graph algorithm