← Quiz: Number Theory for Coding: all 10 questions
Quiz: Number Theory for Coding · Question 9 of 10
How many loop steps does fast power take for an exponent e?
How many loop steps does fast power take for an exponent e?
- A.e
- B.e / 2
- C.√e
- D.About log₂ e, one per binary digit of e
Answer & explanation
Correct answer: About log₂ e, one per binary digit of e
Each step handles one bit of e and squares the base.
Can you get the rest right without peeking?
Take the timed Quiz: Number Theory for Coding quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →