Skip to content

Commit 81ad4b9

Browse files
authored
Updates 0050-pow(x,n).md
1 parent 6d60d59 commit 81ad4b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dsa-solutions/lc-solutions/0000-0099/0050-pow(x,n).md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Implement pow(x, n), which calculates x raised to the power n (i.e., x<sup>n</su
4646

4747
### Constraints
4848

49-
- -100.0 < x < 100.0
50-
- -2<sup>31</sup> <= n <= 2<sup>31</sup>-1
51-
- n is an integer.
52-
- Either x is not zero or n > 0.
53-
- -10<sup>4</sup> <= x<sup>n</sup> <= 10<sup>4</sup>
49+
- $-100.0 < x < 100.0$
50+
- $-2^{31} \leq n \leq 2^{31} - 1$
51+
- $n$ is an integer.
52+
- Either $x$ is not zero or $n > 0$.
53+
- $-10^{4} \leq x^{n} \leq 10^{4}$
5454

5555
### Approach
5656
Initialize ans as 1.0 and store a duplicate copy of n i.e nn using to avoid overflow

0 commit comments

Comments
 (0)