A Ness Digital Engineering analytics pipeline receives an array of integer measurements and a target value x. Return every unique pair of values whose sum equals x.
Each pair must be ordered from smaller to larger, duplicate pairs must be removed, and the final list must be sorted lexicographically. A value may be used twice only when it appears at least twice in the input array. If no pair exists, return an empty list.
Implement find_pairs(nums, x).
nums, a list of integers, and x, an integer target.[a, b] where a + b == x and a <= b.def find_pairs(nums, x):