On Thu, Aug 4, 2011 at 7:37 PM, saurabh singh <saurab...@gmail.com> wrote:
> Its a classical 0/1 knapsack problem which can be implemented either as a > greedy solution or dp,,,, > > It has been stated earlier in the thread that this is an 'NP-Complete' problem. [0] It means, there is no known polynomial-time algorithm for this problem. If you think you have a greedy solution to this problem, think again. The DP solution is also, 'pseudo-polynomial-time' [0] http://en.wikipedia.org/wiki/Partition_problem -- Gaurav Menghani -- 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.