These are the graph problems every placement candidate should be able to solve. Every input is an edge list: first n and m, then one line per edge, with nodes numbered from 1. Pick the tool from the clue first, trace a small input on paper, then check your program against every test.