Find Pairs

Challenge 📝

Given an array of integers arr and a target sum target, find all pairs of distinct integers that add up to the target sum. Return an array of arrays containing these pairs sorted in ascending order. If there are no such pairs, return an empty array.

Important: Your result array(s) must have the same sorting as the test cases.

#JavaScript Loops

Hard

unsolved

function findPairs(arr, target) {
}
Test Cases
Console Logs
JS Errors
Run Code!
flag