1 Two Sum
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> result;
unordered_map<int, int> hash;
for(int i=0; i<nums.size(); i++){
int numToFind = target - nums[i];
if(hash.find(numToFind) != hash.end()){
result.push_back(hash[numToFind]);
result.push_back(i);
break;
}
hash[nums[i]]=i;
}
return result;
}
};