Leetcode in Java && Oracle
422 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2021-10-29_15-02-21.png
33.8 KB
#N1346. Check If N and Its Double Exist
problem link=>https://leetcode.com/problems/check-if-n-and-its-double-exist/

#solution
class Solution {
public boolean checkIfExist(int[] arr) {
for(int i=0; i<arr.length; i++){
for(int j=0; j<arr.length; j++){
if(arr[i]==2*arr[j]&&i!=j)
return true;
}
}

return false;
}
}