LinkedList creat(ElemType A[]
//由含n個數據的數組A生成循環鏈表
{LinkedList h;
h=(LinkedList)malloc(sizeof(LNode));//申請結點
h
for(i=
{pre=h;
p=h
while(p!=h && p
{pre=p; p=p
if(p==h || p
{s=(LinkedList)malloc(sizeof(LNode));
s
}
}//for
return(h);
}算法結束
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23018.html