icoding数据结构习题
电子科大不知名程序员
一个普通人
展开
-
icoding数据结构——查找
ICODING数据结构2022《查找》原创 2022-06-06 10:53:53 · 457 阅读 · 3 评论 -
icoding数据结构——图
6.1#include <stdio.h>#include "graph.h" //请勿删除,否则检查不通过bool del_vertex(ListGraph *G, VertexType v){ int V =locate_vertex(G,v); if(V == -1) return false; while(G->vertex[V].firstarc){ ArcNode *p=G->vertex[V].firstarc;原创 2022-05-17 14:24:54 · 672 阅读 · 0 评论 -
icoding数据结构——字符串篇
3.1#include <stdlib.h>#include <stdio.h>#include <string.h>#include "dsstring.h" // 请不要删除,否则检查不通过{BLString* blstr_myinit(BLString* str, int length){ if(str== NULL) str=(BLString*)malloc(sizeof(BLString)); blstr_init(s.原创 2022-05-16 20:20:18 · 456 阅读 · 0 评论 -
icoding数据结构——队列栈
#include <stdio.h>#include <stdlib.h>#include "list.h" // 请不要删除,否则检查不通过int compute_reverse_polish_notation(char *str){ Stack S; init_stack(&S); int i=0,x,y,res,number_to_push; while(str[i]!='\0'){ if...原创 2022-05-16 20:12:48 · 288 阅读 · 0 评论 -
icoding数据结构——线性表篇
虽然线性表有顺序表和链表,但是难点主要在于链表,因此练习中链表占绝大一部分下面配上题目以及解答,如果有需改进的地方欢迎各位大佬指正。1.1【解答】#include <stdio.h>#include <stdlib.h>#include "list.h" // 请不要删除,否则检查不通过void lnk_merge(LinkList A, LinkList B, LinkList C) { LinkList pa=A->next,pb=..原创 2022-05-14 22:45:29 · 672 阅读 · 3 评论 -
icoding数据结构——树二叉树
5.1#include <stdlib.h>#include <stdio.h>#include "bitree.h" //请不要删除,否则检查不通过// BiTNode* transform(CSNode *root){// if(root==NULL) return NULL;// BiTree broot;// broot = (BiTree)malloc(sizeof(struct Node));// broot..原创 2022-05-17 13:26:00 · 273 阅读 · 0 评论 -
icoding数据结构——数组广义表
4.1#include "crosslist.h"#include <stdio.h>#include <stdlib.h> int init_cross_list(PCrossList L, const ElemType* A, int m, int n){ int i, j, k; OLink q, p; L->rows = m; L->cols = n; L->nums = 0; if (!(原创 2022-05-17 13:16:36 · 353 阅读 · 0 评论