50. Pow(x, n)
Medium
Description
Implement pow(x, n), which calculates x
raised to the power n
(i.e., xn).
Example 1:
Example 2:
Example 3:
Constraints:
n == height.length
1 <= n <= 2 * 104
0 <= height[i] <= 105
Solutions ๐
Medium
Implement pow(x, n), which calculates x
raised to the power n
(i.e., xn).
Example 1:
Example 2:
Example 3:
Constraints:
n == height.length
1 <= n <= 2 * 104
0 <= height[i] <= 105