Easy C++ solution || Brute Force || Beginner Friendly
Code\n\nclass Solution {\npublic:\n    vector<vector<int>> findPrimePairs(int n) {\n        vector<bool> prime(n+1,true);\n        prime[0]=prime[1]=false;\n   
# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> findPrimePairs(int n) {\n        vector<bool> prime(n+1,true);\n        prime[0]=prime[1]=false;\n        for(int i=2;i<=n;i++) \n        {\n          if(prime[i] && (long long)i*i<=n) \n          {\n           for(int j=i*i;j<=n;j+=i)   prime[j] = false;\n           }\n         }\n        set<int> st;\n        for(int i=2;i<n+1;i++)\n        {\n            if(prime[i])  st.insert(i);\n        }\n         map<int,int> mp;\n         for(auto it:st)\n         {\n             int req=n-it;\n             if(mp.find(req)!=mp.end())  continue;\n             if(st.find(req)!=st.end())  mp[it]=req;\n         }\n        vector<vector<int>> ans;\n        for(auto it:mp)     ans.push_back({it.first,it.second});\n        return ans;\n    }\n};\n```
['C++']