Asadullah Ansari

Build-Up Your Problem Solving Skill : Specially Using By C/C++/Data Structure Puzzles/New Technique Algorithm Design/ Understanding New Technology

Archive for the ‘Algo design: Queries’ Category

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

Give the optimized algorithm for this?

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.

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 »