Lintcode:链表节点计数

计算链表中有多少个节点。node 样例python 给出 1->3->5, 返回 3.this python:spa """ Definition of ListNode class ListNode(object): def __init__(self, val, next=None): self.val = val self.next = next "
相关文章
相关标签/搜索