We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
can you please explain secong loop
for(int n=0; n< arr.length; n++){
if(set.contains(arr[n]+k)){
sum+=1;
}}
how it works?actually what its going to check
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
can you please explain secong loop for(int n=0; n< arr.length; n++){ if(set.contains(arr[n]+k)){ sum+=1; }} how it works?actually what its going to check