Missing Numbers

  • + 1 comment

    I think, you can just do the difference between the Counter objects. def missingNumbers(arr, brr): arr = Counter(arr) brr = Counter(brr) missing = brr - arr return sorted(list(missing))

    • + 0 comments

      I'm not very familiar with Counter objects so I didn't know this existed.