sieve algorithm
\n\nclass Solution {\npublic:\n    vector<vector<int>> findPrimePairs(int n) {\n        //sieve Algo\n       vector<bool>isPrime(n+1,true);\n       isPrime[0]=i
\n```\nclass Solution {\npublic:\n    vector<vector<int>> findPrimePairs(int n) {\n        //sieve Algo\n       vector<bool>isPrime(n+1,true);\n       isPrime[0]=isPrime[1]=false;\n        for(int i=2;i<=n;i++){\n            if(isPrime[i]==true){\n                for(int j=i*2;j<=n;j+=i)\n                    isPrime[j]=false;\n            }\n        }\n        \n        \n        vector<vector<int>>res;\n        for(int i=2;i<=n/2;i++){\n            if(isPrime[i]==true){\n                int target=n-i;\n                if(isPrime[target]==true)\n                    res.push_back({i,target});\n            }\n        }\n        \n        return res;\n    }\n};\n```
[]