摘要:        
题目 代码 方法一:HashMap法 class Solution { public int[] intersect(int[] nums1, int[] nums2) { Map<Integer,Integer> map = new HashMap<Integer,Integer>(); List    阅读全文
posted @ 2020-08-02 21:10
sinlearn
阅读(171)
评论(0)
推荐(0)
        
            
        
        
摘要:        
题目 只出现一次的数字 题解 本题的关键是:找出不相同的那个数字,而且要求满足时间复杂度为线性级。 思想:异或(相同为0,不同为1),先通的两个数异或为0,0异或任何数得到原数 class Solution { public int singleNumber(int[] nums) { int an    阅读全文
posted @ 2020-08-02 19:31
sinlearn
阅读(86)
评论(0)
推荐(0)
        

浙公网安备 33010602011771号