Easy C++ Sieve Solution || Best Approach || 🔥🔥
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<bool> prime;\n    void SieveOfEratosthenes(int n)\n    {\n\n        for (int p = 2; p * p <= n; p++) {\n            if (prime[p] == true) {\n                for (int i = p * p; i <= n; i += p)\n                    prime[i] = false;\n            }\n        }\n    }\n    \n    vector<vector<int>> findPrimePairs(int n) {\n        vector<vector<int>> ans;\n        prime.resize(n+1,true);\n        SieveOfEratosthenes(n);\n        for(int i=2;i<=(n/2);i++)\n        {\n            if(prime[i] && prime[n-i])\n                ans.push_back({i,n-i});\n        }\n        return ans;\n    }\n};\n```
['C++']