摘要: void find_mide(int a[],int b[],int n){ int temp; int i=0,j=0,k=0; while (i<n && j<n){ if(a[i]<b[j]){ temp=a[i]; cout<<"temp:"<<temp<<endl; i++; k++; } 阅读全文
posted @ 2022-07-18 15:45 青竹之下 阅读(196) 评论(0) 推荐(0) 编辑
摘要: //循环左动 void Reverse(int R[],int from,int to){ int temp,i; for(i=0;i<(to-from+1)/2;i++){ temp=R[to-i]; R[to-i]=R[from+i]; R[from+i]=temp; } } void Conv 阅读全文
posted @ 2022-07-18 15:05 青竹之下 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 从有序顺序表中删除所有重复值 bool Del_Same(SqList &L) { if(L.length==0) { return false; } int i,j; for (int i = 0; i < L.length; ++i) { if(L.data[i]!=L.data[j+1]) { 阅读全文
posted @ 2022-07-18 14:36 青竹之下 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 题目:从顺序表中删除在定值S到T之间的数据(2023王道数据结构P18 04) bool Del_ST(int data[],int s,int t){ if(s>=t){ return false; } int i=0; int k=0; //用于记录在s,t之外的数据 while (i<5){ 阅读全文
posted @ 2022-07-18 11:24 青竹之下 阅读(89) 评论(0) 推荐(0) 编辑