🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.e
  2. B.e / 2
  3. C.√e
  4. 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 →