0-1 knapsack! On Tue, Jan 3, 2012 at 5:14 PM, saurabh singh <saurab...@gmail.com> wrote:
> 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 <atul.87fri...@gmail.com>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 algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.