Amazon interview question

Topological sorting, prims algorithm questions