Suppose a number is given. You have to write an algorithm to find sum of two elements of a given array which should equal to a given number.

Example:

arr[]={ 2,5 ,7 ,9 ,4 ,6 ,8 }

a number give nSum= 17

then You have to find elements 9 and 8.

## Blogroll

## Subscribe

*In this thread you can ask any questions related to data structure, algorithm design etc and any can post the answer of it.*

Posted by asadullahansari on August 20, 2008

Suppose a number is given. You have to write an algorithm to find sum of two elements of a given array which should equal to a given number.

Example:

arr[]={ 2,5 ,7 ,9 ,4 ,6 ,8 }

a number give nSum= 17

then You have to find elements 9 and 8.

Posted in Algo design: Queries | Leave a Comment »