Graph algorithms for CSC401