Ad
  • Custom User Avatar

    Note that the target is always the sum of one, and only one, pair of indices. In other words, you will not need to return multiple pairs. Here's an example of the test data that I worked with that ended up being "too complicated".

    $numbers = 1..10
    $target = 6

    Returns [0,4] and [1,3].

    Hope this helps simplify the work for someone else!