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.
Most simple solution that i could think of:
def missingNumbers(arr, brr):
for item in arr:
if brr.contains(item):
brr.remove(item)
brr = sorted(set(brr),key = int)
return brr
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 →
Most simple solution that i could think of: def missingNumbers(arr, brr): for item in arr: if brr.contains(item): brr.remove(item) brr = sorted(set(brr),key = int) return brr