C语言 求一个将邻接链表经过拓扑排序转化成一个线性表并输出的程序

[复制链接]
查看11 | 回复1 | 2010-6-7 13:12:08 | 显示全部楼层 |阅读模式
邻接链表是
0
1—>3->4
2->3->5
3->4->5
4->0
5->0
6->1->2
最后建立一个6 1 2 3 4 5 0的链表然后输出
求一个这样的程序 解决问题后有追加分数 谢谢各位大虾

回复

使用道具 举报

千问 | 2010-6-7 13:12:08 | 显示全部楼层
//我在VS2005下调试没问题#include #include #include typedef struct oo{
int k;
struct oo *next;} node;typedef struct{
int k;
node *next;}graph;typedef struct{
int k;} link;graph g[7];link ans[7];int ansCount=0;void insertGra
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行