Solution using Sieve of Eratosthenes and 2 Pointer
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public List<List<Integer>> findPrimePairs(int n) {
        int[]myarr = new int[n+1];
        for(int i=2;i<=n;i++){
            if(myarr[i]==0){
                for(int j=2*i;j<=n;j+=i){
                    myarr[j]=1;
                }
            }
        }
        List<Integer>primes = new ArrayList<>();
        for(int i=2;i<myarr.length;i++){
            if(myarr[i]==0){
                primes.add(i);
            }
        }
        Collections.sort(primes);
        List<List<Integer>>finans = new ArrayList<>();
        int l = 0;
        int r = primes.size()-1;
        while(l<=r){
            int sum = primes.get(l)+primes.get(r);
            if(sum>n){
                r--;
            }else if(sum<n){
                l++;
            }else{
                List<Integer>templ = new ArrayList<>();
                templ.add(primes.get(l));
                templ.add(primes.get(r));
                finans.add(templ);
                l++;
                r--;
            }
        } 
        return finans;
    }
}
```
['Java']