摘要:
将两个已经排好序的链表,比如从小到大,合并成一个有序的链表#include "stdafx.h"#include typedef struct node{ int data; struct node *next;}node, *linklist; void createlist(linklist &L,int n)//逆位序输入n个元素的值,建立带头结点的单链表L {//假设输入为9 7 5 3 1 ,则单链表存储依次为1 3 5 7 9 L=(linklist)malloc(sizeof(node)); L->next=NULL; for(int i=1;. 阅读全文