摘要: 题目描述: 中文: 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 英文: There are two sorted arrays 阅读全文
posted @ 2019-09-18 19:33 hehe哒 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Longest Consecutive Sequence(最长连续序列) 中文: 给定一个未排序的整数数组,找出最长连续序列的长度。 要求算法的时间复杂度为 O(n)。 英文: Given an unsorted array of integers, find the length of 阅读全文
posted @ 2019-09-18 19:29 hehe哒 阅读(199) 评论(0) 推荐(0) 编辑