Skip to content

About unbounded knapsack, how to figure out which items are included & how many times? #251

@kuchaguangjie

Description

@kuchaguangjie

For knapsack 0/1, could figure out which items are included from the resulting 2d array.

But, for the knapsack - unbounded, I have checked KnapsackUnbounded.java, and then searched on Google, but didn't found a solution, to figure out which items are included and how many times each item is included.

Could you clarify whether this can be done, and if yes, how? Many thanks.

(BTW: Maybe this worth another video:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions