定义一个中间指针temp然后p->back->next = q;//让p的前一个节点指向qq->back->next = p;//让q的前一个节点指向p temp = p->next;p->next = q->next;q->next = temp; //交换next指针temp = p->back;p->back = q->back;q->back = temp; //交换back指针