Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用递归计算单链表节点的数量(只有 if 语句没有 while 或 for 循环)
int Elements(Node head) { if (head==null) return 0; else { } head=head.next; }
int Elements(Node head) { if (head==null) return 0; else return 1 + Elements(head.next); }