You are viewing a single comment's thread. Return to all comments →
Javascript solution that worked for me:
function sockMerchant(n, ar) { var res = 0; ar.sort(); for(let i=0; i<n;i++){ if(ar[i] == ar[i+1]){ i++; res++; } } return res; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →
Javascript solution that worked for me: