Re: [algogeeks] subset of an array

2011-10-10 Thread abhishek sharma
yea DP will be O(given no * n) if all array entries are positive and the given no is non negative. On Mon, Oct 10, 2011 at 11:09 PM, anshu mishra wrote: > the simplest code could be for this question is > > void printAllSubsetSum(int ar[], int n, int x) > { > for (i = 0; i < (1< { >

Re: [algogeeks] subset of an array

2011-10-10 Thread anshu mishra
the simplest code could be for this question is void printAllSubsetSum(int ar[], int n, int x) { for (i = 0; i < (1

Re: [algogeeks] subset of an array

2011-10-10 Thread Rashmi Jain
not necessary contiguous.. eg: we are given with an array-1,4,2,26,8,3 and we need to find the subsets of this having sum of its members as 11. ans should be 1,2,8 and 8,3 i hope i am clear this time.. On Mon, Oct 10, 2011 at 9:38 PM, Hatta wrote: > is it a contiguous set, any sparse subset or

Re: [algogeeks] subset of an array

2011-10-10 Thread Hatta
is it a contiguous set, any sparse subset or what? if it's a subset of a set then it can be sparse, but when you say "array" you make it quite tricky to figure out. with all due respect sir, please mind that when you make a question you're taking peoples time to answer it therefore if the answer

[algogeeks] subset of an array

2011-10-10 Thread Rashmi Jain
algo to find subsets of an array whose sum is equal to a given number..? -- 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