Not sqrt! why not pow?


Instructions were clear not to use the sqrt function but nothing was said about power function.

int Solution::sqrt(int A) {
int a = pow(A,0.5);
return a;


Their intention is to help us get used to binary search but not to find loop holes :slight_smile:


Yeah, the intention was clear, just finding loophole after writing the original solution :joy::woozy_face: