yeah can be done in poly tym also...but we dnt knw whether we have unsorted arry....it is possible in sorted array.
On Aug 26, 10:52 pm, Don <[email protected]> wrote: > This is the knapsack problem. > Find a polynomial-time solution and you will be a hero. > Don > > On Aug 26, 12:43 pm, Piyush Grover <[email protected]> wrote: > > > > > > > > > Here is a problem: > > > Given an array of size n. Find all the MAXIMAL subsets whose sum is <= K. > > The solution is not a concern, the optimization is required. > > > -piyush -- 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.
