title: Next Power Of 2
signature: nextPowerOf2 :: Integer -> Integer
  nextPowerOf2 n = 
source_py: def next_power_of_2(n):
      count = 0
      if (n and (not (n & (n - 1)))):
          return n
      while (n != 0):
          n >>= 1
          count += 1
      return (1 << count)
source_cpp: unsigned int next_power_of_2(unsigned int n) {
    unsigned count = 0;
    if ( n && ! ( n & ( n - 1 ) ) ) return n;
    while ( n != 0 ) {
      n >>= 1;
      count += 1;
    }
    return 1 << count;
  }