Two positions that hit a target
Given a list of integers nums and an integer target, return [i, j] with i < j such that nums[i] + nums[j] == target. The two positions must be different, though their values may be equal. At most one such pair exists; if there is none, return [].
Aim for one pass over nums.
Besides the tests, one large input (6,000 numbers) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
pair_indices([2,7,11,15], 9)→[0,1]pair_indices([3,2,4], 6)→[1,2]pair_indices([3,3], 6)→[0,1]