← Back to problems
UNSW COMP2521 · medium

24T2 Q10 — Max |in-deg − out-deg|

stdin: first line N M; then M lines u v (directed edges, vertices 0..N-1). Print the maximum over all vertices of |indegree − outdegree|.


Single-file C (gcc -O0 -Wall). Self-contained reframing of the exam's ADT-completion question. From COMP2521 24T2 Sample.