You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionmissingNumbers(arr,brr){constbrrFreq={}for(letnumofbrr){if(!brrFreq.hasOwnProperty(num)){brrFreq[num]=1}else{brrFreq[num]++}}// substract the elements that are present in arr from brrFreqfor(letnumofarr){brrFreq[num]--}constmissing=[]for(letnumKeyinbrrFreq){if(brrFreq[numKey]!==0){// if there's any number whose count is not 0 then its missingmissing.push(numKey)}}returnmissing.sort((a,b)=>a-b)}
thanks!