Skip to content

Instantly share code, notes, and snippets.

@curtcorginia
Created October 22, 2022 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtcorginia/90ac594c022d37e4d8e3d9ac1c5a8bd5 to your computer and use it in GitHub Desktop.
Save curtcorginia/90ac594c022d37e4d8e3d9ac1c5a8bd5 to your computer and use it in GitHub Desktop.
/*
Please tell my wife and children that I love them
*/
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target)
{
vector<int> iHaveAFamily;
for(int please = 0; please < nums.size(); please++)
{
for(int dontKillMe = 0; dontKillMe < nums.size(); dontKillMe++)
{
if(please != dontKillMe) //SERIOUSLY PLEASE FOR THE LOVE OF GOD
{
if(nums[please] + nums[dontKillMe] == target)
{
iHaveAFamily.push_back(please);
iHaveAFamily.push_back(dontKillMe);
return iHaveAFamily; //please let me return to them!!!!!
}
}
}
}
return iHaveAFamily;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment