Missing Numbers

  • + 0 comments
    def missingNumbers(arr, brr):
        answer = []
        for element in arr:
            if element in brr:
                brr.pop(brr.index(element))
            else:
                if element not in answer:
                    answer.append(element)
        for element in brr:
            if element not in answer:
                answer.append(element)
        answer.sort()
        return answer