Problem 60927. Pairs with Given Sum
Given an array of integers and a target sum, return all unique pairs whose sum is equal to the target. The output should be a matrix with 2 columns representing each pair.
Assume pairs are unordered, i.e., (2, 3) and (3, 2) are considered the same pair.
- try to maintain the sequence as the numbers appear in the input array.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
9 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!