def solution2(values, expected):
    """
    determines if exists two elements in
    values whose sum is exactly expected
    """
    dic = {}
    for index, value in enumerate(values):
        diff = expected - value
        if diff not in dic:
            dic[value] = index
            continue
        return True
    return False