Approach hintTry it first, then revealHide
Compute x^(n/2) once recursively and square it, multiplying by an extra x when n is odd. Convert n to 64 bits before negating, since -n overflows for the smallest int.
Compute x^(n/2) once recursively and square it, multiplying by an extra x when n is odd. Convert n to 64 bits before negating, since -n overflows for the smallest int.