Your question is Find Target Sum Pairs. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
In a Meta-style coding screen, you are given a list of integers and a target value. Return all unique pairs of values whose sum equals the target.
A pair should be included only once, regardless of ordering. For example, (1, 5) and (5, 1) represent the same pair. If a value must be used twice, it must appear at least twice in the input.
nums — a list of integers, and target — an integer[a, b] such that a + b == target and a <= bdef find_target_pairs(nums, target):