def solution(participant, completion):
    # 참가자 dict()
    pmap = dict()
    for p in participant:
        if p in pmap:
            pmap[p] += 1
        else:
            pmap[p] = 1
    # 완주한 사람들 dict()
    for p in completion:
        if p in pmap:
            pmap[p] -= 1
            
    for key, value in pmap.items():
        if value > 0:
            return key

+ Recent posts