数据结构系列之链表——单链表遍历

单链表只遍历一次找中间位置的节点node 设两个指针,head步长为2,temp步长为1,当head到尾时temp到中间spa   void searchmid(node* head,node* mid){指针     node *temp=head;遍历     while(head->next->next!=NULL){链表            head=head->next->next;n
相关文章
相关标签/搜索