Thank me later :))


#1

int Solution::diffPossible(const vector &A, int k) {

unordered_map<int,int> umap;

for(int i=0;i<A.size();i++)
{
    int sum1=A[i]+k;
    int sum2=A[i]-k;
    
    if(umap.count(sum1)!=0||umap.count(sum2)!=0)
     return 1;
     
    umap[A[i]]=1;
}
return 0;

}


#2

what is use of ```
umap[A[i]]=1;