c++  | | BEST SOLUTION
Approach
Make seive to find prime nos.
find the required pairs.

# Approach
1. Make seive to find prime nos.
2. find the required pairs.

```cpp []
class Solution {
public:
    vector<vector<int>> findPrimePairs(int n) {
        vector<bool> arr(n + 1, true);
        arr[0] = arr[1] = false;
        for (int i = 2; i * i <= n; ++i) {
            if (arr[i]) {
                for (int j = i * i; j <= n; j += i) {
                    arr[j] = false;
                }
            }
        }
        vector<vector<int>> ans;
        for (int i = 2; i <= n / 2; ++i) {
            if (arr[i] && arr[n - i]) {
                ans.push_back({i, n - i});
            }
        }
        
        return ans;
    }
};

```
['C++']