Q1
Solution 1: if there are no duplicates in the list
def findDeleted(A, B)
diff = list(set(A) - set(B))
return diff[0]Solution 2: if elements in A and B are numbers
def findDeleted(A, B)
sumA, sumB = 0, 0
for i in A:
sumA += i
for j in B:
sumB += j
return sumA - sumBSolution 3: Use dictionary to store the frequency of B, and search each element in A
Last updated