摘要:
描述 Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. 示例 阅读全文
摘要:
描述 Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? 示例 <! more 算法分析 难度 :中 分析 :条件参考Remove Duplicates算法,只不过之前元素只允许重复1次,现 阅读全文
摘要:
描述 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space 阅读全文