摘要: 题目 给定一个未排序的整数数组 nums ,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。 请你设计并实现时间复杂度为 O(n) 的算法解决此问题。 示例 1: 输入:nums = [100,4,200,1,3,2] 输出:4 解释:最长数字连续序列是 [1, 2, 3, 4]。它的 阅读全文
posted @ 2021-12-27 16:49 你也要来一颗长颈鹿吗 阅读(65) 评论(0) 推荐(0)
摘要: 题目 Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list if th 阅读全文
posted @ 2021-12-27 15:52 你也要来一颗长颈鹿吗 阅读(22) 评论(0) 推荐(0)