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.
let s_arr = arr.sort((a,b)=>a-b);
let s_brr = brr.sort((a,b)=>a-b);
let missing = new Set;
let i=0, j=0;
while(i<s_brr.length){
if (s_brr[i]!=s_arr[j]){
missing.add(s_brr[i++]);
} else {
i++;
j++;
}
}
return Array.from(missing);
Missing Numbers
You are viewing a single comment's thread. Return to all comments →
my JS solution: