Category
Level
Fast exponentiation (binary exponentiation) computes a^n using repeated squaring in O(log n) multiplications.