#include <stdio.h> #include <malloc.h> typedef int DataType; #include "LinList.h" void main() { SLNode *head_A,*head_B,*c,*pa,*pb,*pc; int i,j,x; ListInitiate(&head_A);//初始化链表a ListInsert(head_A,0,1);//a递增链表 ListInsert(head_A,1,3); ListInsert(head_A,2,5); ListInsert(head_A,3,7); pa=head_A->next; ListInitiate(&head_B);
设A和B是两个按元素值递增有序的单链表,写一算法将A和B归并为按按元素值递减有序的单链表C,试分析算法的时间复杂度。(利用上篇带有头结点的线性链表操作)...
最新推荐文章于 2022-11-22 17:02:23 发布