Brutforce solution
Code\n\nint countPairs(vector<int>& nums, int target) {\n    int ans = 0;\n    for(int i = 0; i < nums.size(); ++i){\n        for(int j = i + 1; j < nums.size()
# Code\n```\nint countPairs(vector<int>& nums, int target) {\n    int ans = 0;\n    for(int i = 0; i < nums.size(); ++i){\n        for(int j = i + 1; j < nums.size(); ++j){\n            if(nums[i] + nums[j] < target) ans++;\n        }\n    }\n    return ans;\n}\n```\n\n\n---\n\n<b>Here is an article of my last interview experience - A Journey to FAANG Company, I recomand you to go through this to know which all resources I have used & how I cracked interview at Amazon:\nhttps://leetcode.com/discuss/interview-experience/3171859/Journey-to-a-FAANG-Company-Amazon-or-SDE2-(L5)-or-Bangalore-or-Oct-2022-Accepted\n\n---\n
['C++']