.如下为拓扑排序的C程序
().列出对图执行该程序后的输出结果
().在程序空白处填上适当语句
void topsort(hdnodes graph []int n)
{int ijktop; node_pointer ptr ;
top=;
for (i=; i<n; i++)
if (!graph[i]count){graph[i]count=top; top=i; }
for (i=; i<n; i++)
if()____ {fprintf(stderr \ngraph has a cycle \n); exit(); }
else {j=top;()_____; printf( v%d j) ;
for (ptr=graph[j]link; ptr; ptr=ptr>link)
{k=ptr>vertex; graph[k]count;
if(()_____) {graph[k]count=top; top=k; } } }
} 【浙江大学 六(分)】
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []