#include "stdio.h"
#include"malloc.h"
#define max 10
typedef struct sn{
char data;
struct sn*next;
}node;
int panduan(node *head,int n)
{
char a[max];
int top=0;
node *p;
p=head->next;
while (top<n/2)
{
a[top]=p->data;
top++;
p=p->next;
}
top--;
if(n%2==1)
p=p->next;
while(top>=0)
{
if(a[top]!=p->data
)
return 0;
top--;
p=p->next;
}
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载