文章
5
粉丝
79
获赞
0
访问
3.0k
每日一题 c语言
#include<stdio.h>
typedef struct Node{
int num;
struct Node *Next;
}node;
void Meg(node **head,node *L1,node *L2){
node *ptr,*h;
ptr = (node *) malloc(sizeof (node));
h = (node *) malloc(sizeof (node));
h = *head;
L1 = L1->Next;
L2 = L2->Next;
while(L1 && L2){
if(L1 ->num < L2 ->num){
ptr = L1;
L1 = L1->Next;
}else{
ptr = L2;
L2 = L2->Next;
}
h ->Next = ptr;
h = h->Next;
}
if(L1){
h->Next=L1;
} else
...
登录后发布评论
暂无评论,来抢沙发