Most probably no........This is the subset sum problem which is proven NP
complete...Even if a better solution than n^2 exists it won't work for all
cases....
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD




On Tue, Jan 3, 2012 at 4:56 PM, atul anand <[email protected]> wrote:

> }
> output : {1,1,2}, {2,2}, {3,1}, {1,2,1}{4}...etc which make the sum as 4
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to