class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
unordered_map<int, int> hashtable;
for (int i = 0; i < nums.size(); ++i) {
auto it = hashtable.find(target - nums[i]); //该行中的auto代表的是什么意思呢 刚刚学这块不太懂
if (it != hashtable.end())
{
return {it->second, i};
}
hashtable[nums[i]] = i;
}
return {};
}
};
```