http://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_methodWhat is the time complexity of the right to left method in modular exponentiation?is it O(1) because we are going through the binary representation of e which is constant time? assuming e is a 32-bit integerint mod(int b, int e, int m) {    b = b % m;    int result = 1;    while (e) {        if (e % 2 == 1) {            result = (result * b) % m;        }        b = (b * b) % m;        e >>= 1;    }    return result;}
What is the time complexity of the right to left method in modular exponentiation?
algorithms