But this is not dp rite? I know knapsack problem, it has 2 nested for loops,
thats why it is O(nc). And also, here we have infinite supply of each item.
And we want all possible ways of getting the sum, not just one way.
Here, function is recursively called, like a dfs is performed here...   So,
using the standard knapsack problem, we can't do this right?

On Wed, Aug 3, 2011 at 2:05 AM, Ravinder Kumar <[email protected]> wrote:

> My mistake .........I only saw the program flow which is similar to
> permutation .
>
> Its DP similar to 0,1 knapsack
>
> Complexity is O(nc)
> where c is size of knapsack
> and n is number different of items
>
>
> --
> *With Regards :*
>
> Ravinder Kumar
> B.Tech Final Year
> Computer Science and Engineering
> MNNIT Allahabad
>
>  --
> 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.
>



-- 
Regards,*
Aanchal Goyal*.

-- 
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