adding prims algorithm and some valid test cases.