摘要:        
题目:https://leetcode-cn.com/problems/intersection-of-two-arrays-ii/ 分析:这道题与349类似,只是要元素可以出现重复,所有考虑使用"multiset";还可以考虑使用“排序+双指针”。 代码1: C++版本: vector<int>     阅读全文
posted @ 2021-10-21 10:53
wltree
阅读(25)
评论(0)
推荐(0)
        
            
        
        
摘要:        
题目:https://leetcode-cn.com/problems/intersection-of-two-arrays/ 想法:使用“unordered_set”来处理数组 代码: C++版本: vector<int> intersection(vector<int>& nums1, vect    阅读全文
posted @ 2021-10-21 10:16
wltree
阅读(239)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号