A feature in the eToro watchlist service needs to detect whether two observed integer values combine to a specified target. Given an unsorted array of integers nums and an integer target, return True if two different elements sum to target; otherwise, return False.
Each array element may be used at most once. Duplicate values are allowed, so two separate occurrences of the same value can form a valid pair.
nums, a list of integers, and target, an integer.i and j exist such that i != j and nums[i] + nums[j] == target.def has_pair_sum(nums, target):