Perforce Helix Core tooling may need to identify two numeric change metrics whose combined value matches a requested threshold. Given an array of integers and a target integer, return any pair of distinct elements whose values add up to the target. Return -1 if no such pair exists.
Implement pair_sum(nums, target).
nums, a list of integers, and target, an integer.target, or the integer -1 when no pair exists.def pair_sum(nums, target):