You are viewing a single comment's thread. Return to all comments →
javascript
function pairs(k, arr) { let count = 0, unique = new Set(arr) for (let i = 0; i < arr.length; i++) { if (unique.has(arr[i] + k)) count++ } return count }
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 →
javascript