Not sqrt! why not pow?


#1

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;
}


#2

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


#3

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