typedef struct Node
{
int data;
struct Node *next;
}Node; //这里结构体的定义视你的需要自己换
void Fun(Node **heada,Node **headb,int i,int j,int len)
{
Node *p,*q,*r;
p = *heada;
q = *heada;
int n = 1;
while(n++ < i)
p = p->next;
q = p->next;
n = 0;
while(n ++ < len && q)
q = q->next;
r = p->next;
p->next = q->next;
q->next = NULL;
n = 1;
p = *headb;
while(n++
q->next = p->next;
p->next = r;
}
程序里面没有考虑你的参数不合理的情况