Python || erathosthenes || Hashmap
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)$$ -->O(N)

# Code
```python3 []
class Solution:
    def findPrimePairs(self, n: int) -> List[List[int]]:
        arr = []
        result = []
        if n == 2 or n == 1 or n == 0:
            return []
        primes = [True] * (n + 1)
        primes[0] = False
        primes[1] = False
        for i in range(2,int(n ** 0.5) + 1):
            if primes[i]:
                for j in range(i*i,n+1,i):
                    primes[j] = False
        for i in range(len(primes)):
            if primes[i]:
                arr.append(i)
        hashmap = {}
        for i in range(len(arr)):
            difference = n - arr[i]
            if difference in hashmap or 2 * difference == n:
                result.append([min(difference,arr[i]),max(difference,arr[i])])
            hashmap[arr[i]] = i
        result.sort()
        return result
        
```
['Python3']