Skip to content

Add fractional Knapsack problem Solution with Greedy Algorithm in Others #2272

@thomas2400

Description

@thomas2400

Solving the popular knapsack problem with greedy Algorithm.

The greedy algorithm will select the item to be keep in bag based on their cost which is the product of weight and value of the item.

                                 value                      Weight
   item 1                         90                          10
   item 2                        100                          20
   item 3                        120                          30

bag capacity = 50

max value to be obtained = 270

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions