• 2023-04-18更完整的顺序表
    #include<bits/stdc++.h>#include<string.h>usingnamespacestd;#definemaxlen100//表的最大长度typedefstruct{ intkey; charname[20]; intage;}Data;//节点的结构typedefstruct{ Datalistdata[maxlen];//用于保存结点的结构体数组 intlistlen;//节点数量/表的
  • 2023-04-17未知顺序表
    #include<iostream>#include<string>usingnamespacestd;#include<bits/stdc++.h>#definemaxlen100//表的最大长度typedefstruct{ charkey[10]; charname[20]; intage;}Data;//节点的结构typedefstruct{ Datalistdata[maxlen+1];//用于保存结点的结构体数组 int
  • 2022-12-02golang选择排序
    选择排序:每一轮迭代选择出一个最小的数,然后做一次交换元素。不用像冒泡排序那样需要交换元素那么频繁。不过也是效率比较槽糕。原理介绍:{4,7,3,10,1,8,19}第一轮迭代,从第一
  • 2022-10-05合并10/5
    #include<stdio.h>#include<stdlib.h>#defineMAXSIZE20typedefstructLNODE{charlist[MAXSIZE];intlistlen;//表的当前长度}*List,L;voidinit(ListPtrl,inta
  • 2022-10-04顺序表10/4
    #include<stdio.h>#include<stdlib.h>#defineMAXSIZE20typedefstructLNODE{charlist[MAXSIZE];intlistlen;//表的当前长度}*List,L;ListnewList();voidshowLis