You are viewing a single comment's thread. Return to all comments →
Python Solution:
def missingNumbers(arr, brr): brr.sort() arr.sort() biggest_val = brr[-1] arr_count_arr = [0] * (biggest_val + 1) brr_count_arr = [0]* (biggest_val + 1) result = [] # print(brr_count_arr) for i in range(len(brr)): brr_count_arr[brr[i]] += 1 for i in range(len(arr)): arr_count_arr[arr[i]] += 1 for i in range(len(brr_count_arr)): if brr_count_arr[i] != arr_count_arr[i]: result.append(i) return result
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 →
Python Solution: