input: Write a python function to generate the next power of 2 greater than a given number.
  assert nextPowerOf2(4) == 8
  assert nextPowerOf2(7) == 8
  assert nextPowerOf2(15) == 16
output: def nextPowerOf2(n):
      if n <= 0:
          return 1
      power = 1
      while power <= n:
          power <<= 1
      return power