length";\rdeletet;\r)\r¯®P°±²fg®\rtemplate<classtypoboollist<type>::insert(typet,intp)\r(\rlistnode<type>*ptr;\rptr=first;\rintk=l;\rwhile(ptr!=NULL&&k<p)\r(\rptr=ptr->next;\rk++;\r)\rif(ptr==NULL&&k!=p)\rreturnfalse;\relse\r(\rlistnode<type>*tp;\rtp=newlistnode<type>;\rtp->data=t;\rtp->next=ptr->next;\rptr->next=tp;\rlength++;\rreturntrue;\r}EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r21.aº»¼fg½~p¾I¿(ÀÁ?ÂÃÄ\rÅÆÇ?gÈ^ÉÊ)\rstructnode{charval;node*next;}\rboolcheck(constnode*head){}//returnfalse:˾true:¾\rf0(n)IÌhp(ÍgÉÊfgÎÏÐÑfÒfgÎÏÐÑÒ,\raÓ¾IÔÕÖ¡×ØÙÚ¡)\rboolcheck(constnode*head)\r(\rif(head==NULL)returnfalse;\rnode*low=head,*fast=head->next;\rwhile(fast!=NULL&&fast->next!=NULL)\r{\rlow=low->next;\rfast=fast->next->next;\rif(low==fast)returntrue;\rreturnfalse;