In this homework, you need to implement the basic graph data structure and four commands.
addEdge
shortest path
minimum spanning tree
two color
Input starts with an integer n indicating the number of nodes in the graph, 0 <= n<= 2500. Then, a set of m edges, 0<= m<=950000, and k command, 0<=0k<=30, are given. The following four commands might appear multiple times (even interleaving) add, shortest_path, mst_weight, two_colorable.
Print the outputs of the given commands.