-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
图 #139
图 #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
随机抽查到,给了一点建议,是否修改自己拿主意,非强制要求修改。
2017-1/ywy/图/TU.c
Outdated
break; | ||
} | ||
} | ||
G->arcs[i][j].adj = 1;//���֮������ߣ���ֵΪ1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原来这种风格的代码可能是源自你这儿啊? #144 你俩是好朋友?
2017-1/ywy/图/TU.c
Outdated
} | ||
} | ||
//�����ڽӾ���; | ||
LocateVex(G, 1, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考这里我的代码审查意见,一模一样的问题 #144
修改的作业中拆分了LocateVex的功能,仅输出顶点位置,添加InsertArc 函数连接两顶点 |
我是专门来围观:二茶🌲的 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试运行的结果与提交的结果文件不同,结果有问题,注意作业要求是每次插入和删除节点都要进行遍历输出。需要进一步理清思路和逻辑,修改相应的代码。
2017-1/ywy/排序二叉树/00.c
Outdated
|
||
//��������������� | ||
//����Ļ�������Ҫ�ı����ĵ�ַ�����Դ����Ƕ���ָ�� | ||
void inseart(PNode * T, KeyType key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意拼写..
{ | ||
if (flag == 1) | ||
{ | ||
fwrite(d, sizeof(d), 1, pfile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里sizeof计算的长度有问题,sizeof
是一个运算符,在代码的编译期
被执行,具体可以参考C++语言爱好者众筹的这个维基页解释 http://zh.cppreference.com/w/c/language/sizeof
这里建议把变量d
的声明和定义改写为数组形式,如下:
char d[] = ", ";
这样,再调用sizeof
运算符的时候,在代码编译期
即可正确计算出该变量所占用的内存空间大小为3
。
一次性提交的有点多,辛苦师姐了!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 二叉排序树输出结果仍然有问题,如有时间继续修改,过期合并
- 排序问题整体完成没有问题,建议使用函数提高代码重用性
- Hash表建议生成更大的数据测试冲突情况
- 正确使用git:直接在需要修改的文件上进行修改即可,git会自动记录文件变化情况,不需要创建多个文件,可以将个人文件夹里过期的文件进行删除和清理,以后修改代码在现有文件中直接修改即可
2017-1/ywy/纠正版排序/Sort.c
Outdated
} | ||
printf("\n�Ƚϴ���%d ��������: %d ����֮��: %d\n", count1, count2, count1 + count2); | ||
printf("\n"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以将每个排序结果输出的功能封装成一个函数,增强代码重用性。
2017-1/ywy/Hash表/Hash.c
Outdated
{ | ||
|
||
temp.key = (int) rand() % size; | ||
temp.val = (int) rand() % size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里生成的数据永远都不会造成冲突,建议生成更大的数据以便测试冲突情况
另外需要注意自动格式化 |
好。 |
广度优先遍历及输出最短路径