You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def beautifulPairs(A, B): pairs = 0 for num in B: if num in A: A.remove(num) pairs += 1 if B: if A: return pairs + 1 return pairs - 1 elif A: return pairs else: return pairs - 1
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Pairs
You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!