My set based solution python max tc -nlogn


#1
class Solution:
# @param A : list of integers
# @param B : list of integers
# @param C : list of integers
# @return a list of integers
def solve(self, A, B, C):
    sa=set(A)
    sb=set(B)
    sc=set(C)
    asn=[]
    asn.extend(list(sa & sb))
    asn.extend(list(sc & sb))
    asn.extend(list(sa & sc))
    return sorted(set(asn))