Identify connected components of a graph Si nh Vi en Zo ne C om Based on Depth-first-search procedure visit (k: integer); var t: link; begin id: = id + 1; val[k]: = id; /* change the status of k to “visited” */ write(name(k)); t: = adj[k]; / * find the neighbors of the vertex k */ while t z begin if val[t v] = then visit(t v); t: = t next end end; SinhVienZone.com https://fb.com/sinhvienzonevn om Si nh Vi en Zo ne C begin id: = 0; for k: = to V val[k]: = 0; /initialize the status of all vetices */ for k: = to V begin if val[k] = then visit(k); writeln; writeln end; end; SinhVienZone.com https://fb.com/sinhvienzonevn ... 0; for k: = to V val[k]: = 0; /initialize the status of all vetices */ for k: = to V begin if val[k] = then visit(k); writeln; writeln end; end; SinhVienZone. com https://fb .com/ sinhvienzonevn