Show the worked solution\[\boxed{V(G)=e-n+2}\]McCabe's cyclomatic complexity of a connected flow graph with \(e\) edges and \(n\) nodes counts the independent paths. Equivalently, \(V(G)\) equals the number of decision nodes plus 1, or the number of regions of the planar flow graph.
Check with a single if-else: 4 nodes, 4 edges, \(V=4-4+2=2\) paths.Answer: B
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com