program matrixGraph; const n = 10; (* Number of nodes *) var graph = array [1..n,1..n] of boolean; ...
program listGraph; const n = 10; (* Number of nodes *) type adjList = ^adjListElem; adjListElem = record node : integer; next : adjList; end; var graph = array [1..n] of adjList; ...