from typing import List


def has_two_sum(arr: List[int], target: int) -> bool:
    """Build a set to store the complements. If complement exists, then the pair is found.

    This takes O(n) time and O(n) space."""
    if len(arr) == 0:
        raise ValueError("arr must not be empty")
    complements = set()
    for v in arr:
        if v in complements:
            return True
        complements.add(target - v)
    return False