求单链表中有效节点的个数(如果有头结点,不统计头结点)
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; }
真的好拼呀
使用js实现数组的快速排序
一棵具有n个结点的二叉树,若它有m个叶子结点,则该二叉树中度为1的结点个数是多少?
B2C网站上促销价格出错了,如何做危机公关?
怎么理解产品经理与技术研发之间的关系?
真的好拼呀