求单链表中有效节点的个数(如果有头结点,不统计头结点)
public static int getLenth(Node head){ if (head.next == null) { return 0; } int lenth = 0; //让辅助指针指向头结点的下一个,就没有统计头结点 Node temp = head.next; while(temp != null){ temp = temp.next; lenth++; } return lenth; }
真的好拼呀
小程序没有分享到朋友圈的功能,但是产品为了推广,需要曲线实现这个功能,请给出设计方案?
请你谈谈Cookie的弊端
北京有一条1公里长的街道,你认为一天能收多少钱的停车费?
什么是 Cookie?它的作用是什么?
真的好拼呀