Doing myPow(1 / x, -n) for INT_MIN will result in an infinite loop. Changing n's type to long long fixes this.
myPow(1 / x, -n)
You want the problem changed just because you can't handle it? Also, how is long long any better? Doesn't that have the exact same problem, just with LONG_LONG_MIN?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.