since leetcode don't have a lot of graph (bfs )questions, I put some classical graph algorithms here for practice.