diff --git a/math/binary_exponent.cpp b/math/binary_exponent.cpp index 512365c4a..c193b79b9 100644 --- a/math/binary_exponent.cpp +++ b/math/binary_exponent.cpp @@ -1,4 +1,4 @@ -/// C++ Program to find Binary Exponent recursively. +///C++ Program to find Binary Exponent recursively. #include /* @@ -8,6 +8,7 @@ * (instead of O(n) multiplications required by the naive approach). */ +///Function to calculate exponent in O(log(n)) using binary exponent. int binExpo(int a,int b) { if (b == 0) return 1; int res = binExpo(a,b/2);