We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae3bd72 commit c7fe697Copy full SHA for c7fe697
Maths/BinaryExponentiationIterative.js
@@ -1,6 +1,8 @@
1
// To calculate x^n i.e. exponent(x, n) in O(log n) time in iterative way
2
// n is an integer and n >= 0
3
4
+// Explanation: https://en.wikipedia.org/wiki/Exponentiation_by_squaring
5
+
6
// Examples:
7
// 2^3 = 8
8
// 5^0 = 1
0 commit comments