[Python 3] Sieve Eratosthenes Algorithms + Two sum
Intuition\nUsing Eratosthenes to find the primes number in a range with low time complexity O(Nlog(logN))\n Describe your first thoughts on how to solve this pr
# Intuition\nUsing Eratosthenes to find the primes number in a range with low time complexity $$O(Nlog(logN))$$\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: $$O(Nlog(logN))$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(N)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def findPrimePairs(self, n: int) -> List[List[int]]:\n        res = []\n        \n        primes = [1 for _ in range(n + 1)]\n        primes[0] = primes[1] = 0\n        p = 2\n        while p ** 2 <= n:\n            if primes[p]:\n                for i in range(p ** 2, n + 1, p): primes[i] = 0\n            p += 1\n        \n        for p in range(2, n // 2 + 1):\n            if primes[p] and primes[n - p]:\n                res.append([p, n - p])\n        return res\n```
['Math', 'Two Pointers', 'Python3']