← All questions
Coding
Super Pow
Asked at
Meta
1Give yourself 5 minutes
2Answer out loud, not in your head
3Then compare with the answer below
0
Stuck? Show a way to structure it+
- 01Represent the exponent digit sequence recursively or iteratively.
- 02Use modular fast power for small exponent pieces.
- 03For each final digit d, combine previous result to the tenth power with a to d.
- 04Apply modulus after every multiplication.
Reference answer
Then expect these follow-ups
Why does processing one digit use a tenth power?
Tests: algebra
How does binary exponentiation work?
Tests: modular power
Free to read · better with Enzo
Practice this out loud with Enzo
Enzo runs it as a mock interview, pushes back with follow-ups, and grades you on the rubric.
Next question