#include<stdio.h>
#include<stdlib.h>
typedef struct Lnode{
struct Lnode *next;
int data;
}Lnode,*ListLink;
Lnode* SearchSame(ListLink L1,ListLink L2){
if(L1==NULL || L2==NULL){return NULL;}
int lengthL1=0,lengthL2=0;Lnode *p;
p=L1;
while(p->next!=NULL){lengthL1++;p=p->next;}
......................
阅读全部 | 2025年3月14日 10:53
#include<stdio.h>
//以最小为开头,一个一个型
/*int sort(int A[],int low,int high){
int temp;
int mean=(low+high)/2;
if((A[mean]-A[low])*(A[mean]-A[high])<=0){temp=A[low];A[low]=A[mean];A[mean]=temp;}
else if((A[low]-A[mean])*(A[low]-A[high])<=0){}
else{temp=A[high];A[high]=A[low];A[low]=temp;}
temp=A[low];
while(low<high){
while(low<high && A[high]>=temp){high--;}
A[low]=A[high];
......................
阅读全部 | 2025年3月13日 19:01
#include<stdio.h>
#include<stdlib.h>
#define initsize 100
typedef struct{
int *data;
int length;
int maxsize;
}sqlist;
void createlist(sqlist &L){
L.data=(int *)malloc(sizeof(int)*initsize);
L.length=0;
L.maxsize=initsize;
......................
阅读全部 | 2025年3月11日 00:03