def two_sum_hash_method(input_array, reqd_sum):
    """Two sum using a hash.

    Complexity
    ----------
    time: O(len(input_array))
    space: O(len(input_array))

    Parameters
    ----------
    input_array: list
    reqd_sum: int 

    Returns
    -------
    bool: If the two sum exists

    """
    two_sum_hash = set()
    for number in input_array:
        if (reqd_sum - number) in two_sum_hash:
            return True
        two_sum_hash.add(number)
    return False