input: Write a function `primeSieve(n)` that takes an integer `n` as input and returns a list of all prime numbers up to `n` using the Sieve of Eratosthenes algorithm.
  
  assert primeSieve(10) == [2, 3, 5, 7]
  assert primeSieve(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert primeSieve(0) == []
  assert primeSieve(1) == []
  assert primeSieve(2) == [2]
output: def primeSieve(n):
      if n < 2:
          return []
      is_prime = [True] * (n + 1)
      is_prime[0] = is_prime[1] = False
      for i in range(2, int(n**0.5) + 1):
          if is_prime[i]:
              for j in range(i*i, n + 1, i):
                  is_prime[j] = False
      return [i for i in range(2, n + 1) if is_prime[i]]