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.
functionmissingNumbers(arr:number[],brr:number[]):number[]{// Write your code herewhile(arr.length>0){if(brr.indexOf(arr[0])>=0){constindex=brr.indexOf(arr[0])brr[index]=undefined}arr.shift()}constremaminingSorted=Array.from(newSet(brr.filter(n=>!isNaN(n)).sort((a,b)=>a-b)))returnremaminingSorted}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Missing Numbers
You are viewing a single comment's thread. Return to all comments →
Typescript