Prime Pairs With Target Sum | sieve of eratosthenes
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> findPrimePairs(int n) {\n        vector<int>isPrime(n+1, 1);\n        for(int i=2; i*i<=n; i++){\n            if(isPrime[i] == 1){\n                for(long long j=i*i; j<=n; j+=i) isPrime[j] = 0;\n            }\n        }\n        \n        vector<vector<int>>pairs;\n        for(int i=2; i<=n/2; i++){\n            if(isPrime[i]==1 && isPrime[n-i]==1){\n                pairs.push_back({i,n-i});\n            }\n        }\n        return pairs;\n    }\n};\n```
['Array', 'Math', 'C++']