633. 平方数之和
LeetCode每日一题 2021/4/27
//双指针
class Solution{
public:
bool judgeSquareSum(int c){
long i = 0, j = sqrt(c);
while(i <= j){
if(i * i + j * j < c) i++;
else if(i * i + j * j > c) j--;
else return true;
}
return false;
}
};