算法
qq_41014682
湖大大三的渣渣....主要学习的方向是:java,web,Android
展开
-
LeetCode两数之和
给定一个整数数列,找出其中和为特定值的那两个数。class Solution { public int[] twoSum(int[] nums, int target) { TreeMap<Integer,Integer> map=new TreeMap<>();//hashmap都可以 for(int i=0;i<...原创 2018-04-10 16:36:16 · 506 阅读 · 0 评论 -
LeetCodeLeetCode 两个排序数组的中位数问题
有两个大小为 m 和 n 的排序数组 nums1 和 nums2 。请找出两个排序数组的中位数并且总的运行时间复杂度为 O(log (m+n)) 。示例 1:nums1 = [1, 3]nums2 = [2]中位数是 2.0 示例 2:nums1 = [1, 2]nums2 = [3, 4]中位数是 (2 + 3)/2 = 2.5 这是问题,我刚开始刷l...原创 2018-04-04 09:57:43 · 12048 阅读 · 5 评论