Search
⌘K

Leetcode 372. Super Pow

Compute a^b mod 1337 where a is an integer and b is an extremely large exponent given as an array of decimal digits; the key challenge is handling the huge exponent by processing digits and using modular exponentiation with exponent decomposition (e.g., a^(10x+d) = (a^10)^x * a^d).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.