Pair of Positions Adding Up to a Target

Asked at Agoda · Coding Questions · Difficulty: Easy

You are given a list of integers and a target value. Find two different positions in the list whose values add up to the target, and return those two positions. If no such pair exists, return an empty list.

Loading the problem…