This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingOne pass over the edges adds one to each endpoint (both directions when edges are undirected).
What this asks
Compute the degree of every vertex.
Add one per edge to each endpoint; directed graphs split it into in and out counts.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing