python返回链表中点

    def find_middle(self):
        if not self._head or self._head.next is None:
            return self._head
        
        fast, slow = self._head, self._head
        fast = fast.next
        
        while fast and fast.next:
            slow = slow.next
            fast = fast.next.next
        return slow
上一篇:开启慢查询日志


下一篇:jquery显示/隐藏