标签:ret i++ and bool exist == ++ problem pre
class Solution {
public:
bool checkIfExist(vector<int>& arr) {
for(int i=0;i<arr.size();i++)
{
for(int j=0;j<arr.size();j++)
{
if(i==j)
continue;
if(arr[i]==arr[j]*2)
return true;
}
}
return false;
}
};
LeetCode 1346. Check If N and Its Double Exist
标签:ret i++ and bool exist == ++ problem pre
原文地址:https://www.cnblogs.com/dacc123/p/12288369.html