Code of graph algorithm practice.