You are viewing a single comment's thread. Return to all comments →
from collections import Counter def missingNumbers(arr, brr): count_a = Counter(arr) count_b = Counter(brr) result = [] for i in arr: if i in brr and count_a[i] == count_b[i]: pass else: if i not in result: result.append(i) for i in brr: if i not in arr: result.append(i) return sorted(result, reverse = False)
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 →