#include<stdio.h>#include<conio.h>#define OVERFLOW -2#define OK 1typedef struct LNode{ int data; struct LNode *next;}LNode,*Linklist;int initlist(LNode *L){ L=(LNode *)malloc(sizeof(LNode)); if(!L)exit(OVERFLOW); L->next=NULL; return OK;}void Creatlist(LNode *L ,int n){ LNode *p,*...
#include<stdio.h>#include<stdlib.h>#define n 10void rsh(int *a,int k) { int i,j,l,p,temp; for(i=1;i<=k;i++) if(n%i==0&&k%i==0) p=i; for(i=0;i<p;i++) { j=i; l=(i+n-k)%n; temp=a[i]; while(l!=i) { a[...
#include<stdio.h>#define STACK_INIT_SIZE 100#define STACKINCREMENT 10#define OVERFLOW -2#define OK 1#define TURE 1#define Error 0typedef struct{ int *top; int *base; int stacksize;}Sqstack;void initstack(Sqstack *S){ S->base=(int)malloc(STACK_INIT_SIZE*sizeof (int)); if(!S->base)exit...