摘要:鏈表結(jié)點的結(jié)構(gòu)類型定義如下:typedefstructNode{ElemTypeelem;structNode*next;}NodeType;【C函數(shù)】voidDifference(NodeType**LA,NodeType*LB){NodeType*pa,*pb,*pre,*q;pre=NULL;(1);while(pa){pb=LB;while((2))pb=pb->next;if((3)){if(!pre)*LA=(4);else(5)=pa
鏈表結(jié)點的結(jié)構(gòu)類型定義如下:
typedef struct Node{
ElemType elem;
struct Node *next;
}NodeType;
【C 函數(shù)】
void Difference(NodeType **LA, NodeType *LB)
{
NodeType *pa, *pb, *pre, *q;
pre = NULL;
?。?) ;
while (pa) {
pb = LB;
while ( (2) )
pb = pb->next;
if ( (3) ) {
if (!pre)
*LA = (4) ;
else
(5) = pa->next;
q = pa;
pa = pa->next;
free(q);
}
else {
?。?) ;
pa = pa->next;
}
}
} [答案討論]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]
軟考備考資料免費領取
去領取