//返回链表长度
public int length(){
int len=0;
Node tmp=head;
while(tmp!=null){
len++;
tmp=tmp.next;
}
return len;
}
链表-返回链表长度
猜你喜欢
转载自blog.csdn.net/weixin_42146769/article/details/88411104
今日推荐
周排行