20051002331(15230)1.(KR)KRK()A.B.C.D.2.ni(1in)()A.n-i+1B.iC.i+1D.n-i3.head()A.head==NULLB.head-next==NULLC.head!=NULLD.head-next==head4.()A.B.C.D.5.123456()A.243156B.324165C.432156D.2351646.()A.B.C.D.7.nm(mn)()A.mB.n-mC.n-m+1D.n8.A121831150A97()A.429B.432C.435D.4389.L=((a,b),(c,d),(e,f))tail(tail(L))()A.(e,f)B.((e,f))C.(f)D.()10.()11.n()A.n-1B.nC.n(n-1)/2D.n(n-1)12.(5623789288671934)3()A.(1923563478678892)B.(2356786688921934)C.(1923345667788892)D.(1923675634789288)13.9B-()A.4B.5C.8D.914.()A.B.C.D.15.ISAMVSAM()A.B.C.D.(10220)16.____________17.*p()____________18.____________19.substr(s,i,len)silenstrlen(s)ss=ABCDEFGHIJK,t=ABCDsubstr(s,strlen(t),strlen(t))____________20.LS=(a1,a2,a3,an)1LS____________21.T57____________22.vv____________23.____________24.____________25.m____________(4520)26.seqnmrearquelen(1)(2)(3)m=40,rear=13,quelen=19,(4)(1)(2)(3)(4)27.ABCDEFGBAFEGCD28.29.710(1){1,2,3,4,5,6,7}(2)(1)(2)(4520)30.(1)L=(3,7,11,14,20,51)f30(&L,15)L(2)L=(4,7,10,14,20,51)f30(&L,10)L(3)voidf30(SeqList*L,DataTypex){inti=0,j;while(iL-length&&xL-datai)i++;if(iL-length&&x==L-datai){for(j=i+1;jL-length;j++)L-dataj-1=L-dataj;L-length--;}else{for(j=L-length;ji;j--)L-dataj=L-dataj-1;L-datai=x;L-length++;}}(1)(2)(3)31.#defineMaxNum50//typedefstructnode{intadjvex;//structnode*next;//}EdgeNode;//typedefstruct{charvertex;//EdgeNode*firstedge;//}VertexNode;//typedefstruct{VertexNodeadjlistMaxNum;//intn,e;//}ALGraph;//G()typedefenum{FALSE,TRUE}Boolean;BooleanvisitedMaxNum;voidDFSForest(ALGraph*G){inti;for(i=0;iG-n;i++)visitedi=(1);for(i=0;iG-n;i++)if(!visitedi)DFSTree(G,i);}voidDFSTree(ALGraph*G,inti){EdgeNode*p;visitedi=TRUE;p=G-adjlisti.firstedge;while(p!=NULL){if(!visitedp-adjvex){printf(%c,%c,G-adjlisti.vertex,keynextG-adjlistp-adjvex.vertex);(2);}(3);}}(1)(2)(3)32.(1)L8={3,0,5,1,6,4,2,7}f32(L8)L(2)voidf32(intR,intn){inti,t;for(i=0;in-1;i++)while(Ri!=i){t=RRi;RRi=Ri;Ri=t;}}(1)(2)33.mHash(key)=key%mvoidf33(LinkListL,LinkListH,intm){//LHinti,j;LinkListp,q;for(i=0;im;i++)Hi=(1);p=L-next;while(p){q=p-next;j=p-key%m;(2);Hj=p;(3);}free(L);}(1)(2)(3)(10)34.typedefcharDataType;typedefstructnode{DataTypedata;structnode*lchild,*rchild;//structnode*parent;//}BinTNode;typedefBinTNode*BinTree;pxpx(1)(2)px