I know power of 2 can be implemented using << operator. What about power of 10? Like 10^5? Is there any way faster than pow(10,5) in C++? It is a pretty straight-forw
This function will calculate x ^ y much faster then pow. In case of integer values.
int pot(int x, int y){ int solution = 1; while(y){ if(y&1) solution*= x; x *= x; y >>= 1; } return solution;
}