Showing posts with label How to find pairs of number to get magic sum. Show all posts
Showing posts with label How to find pairs of number to get magic sum. Show all posts

How to find pair of numbers to get magic sum

Given an array of integers, and a number 'magic', print all the pairs in the array whose sum is equal to 'magic'. If we don't find any pair to get that 'magic' number then...