#include <stdio.h>
#include <stdlib.h>
#include<string.h>
typedef struct node
{
int data;
struct node *next;
}Node;
void Creatlist(Node head, int n)
{
Node p;
p = (Node)malloc(sizeof(Node));
p = head;
for(int i=0; i<n; i++){
p->next = (Node)malloc(sizeof(Node));
scanf("%d", &p->next->data);
p = p->next;
}
p->next = NULL;
}
Node *hebinglist(Node *head1,Node *head2)
{
if(!head1)
return head2;
if(!head2)
return head1;
if(head1->data <= head2->data){
head1->next = hebinglist(head1->next,head2);
return head1;
}
if(head1->data > head2->data){
head2->next = hebinglist(head1,head2->next);
return head2;
}
};
void Outputlist(Node *head)
{
Node *p = head->next;
while(p){
printf("%d ", p->data);
p = p->next;
}
}