摘要: [https://leetcode-cn.com/problems/container-with-most-water/] 给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。 找出其中的两条线,使得它们与 x  阅读全文
posted @ 2022-02-18 22:32 github_user 阅读(54) 评论(0) 推荐(0)
摘要: [https://leetcode-cn.com/problems/median-of-two-sorted-arrays/] 给定两个大小分别为 m 和 n 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数 。 算法的时间复杂度应该为 O(log (m+n 阅读全文
posted @ 2022-02-18 21:04 github_user 阅读(38) 评论(0) 推荐(0)
摘要: https://leetcode-cn.com/problems/two-sum/ 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不 阅读全文
posted @ 2022-02-18 20:42 github_user 阅读(33) 评论(0) 推荐(0)