1. 两数之和12345678910111213vector<int> twoSum(vector<int>& nums, int target){ /*map*/ umordered_map<int, int> hashtable; 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 {};}