Showing posts with label Pair of given sum. Show all posts
Showing posts with label Pair of given sum. Show all posts

How to find integer pairs with given sum

Given an array of integers, and a number ‘sum’, find the number of pairs of integer in the array whose sum is equal to ‘sum’. Array can be a combination of +ve, -ve and...