Created
October 22, 2022 21:33
-
-
Save curtcorginia/90ac594c022d37e4d8e3d9ac1c5a8bd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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