1. 两数之和(为目标值) 3min1234567891011121314vector<int> twoSum(vector<int>& nums, int target){ umordered_map<int, int> hashtable; /* xiaoguo */ for(int i = 0; i < nums.size(); i++) { auto it = hashtable.find(target - nums[i]); if(it != hashtable.end()) return {it->second, i}; hashtable[nums[i]] = i; } return {};}