def two_number_sum(arr, target):
    """Takes an array and target sum and return a pair of elements from that array
    that sum to the target.

    Args:
        arr (list): array of elements
        target (int): target sum
    """
    # lookup that keeps track of already tracked elements
    lookup = { arr[0]: True }
    
    for element in arr[1:]:
        diff = target - element
        if diff in lookup:
            return [ element, diff ]
        lookup[element] = True
        
    return []