Amazon Interview Question

Topological sorting, prims algorithm questions