harsh-dart / HactoberFest2024

16 stars 170 forks source link

Implement Knapsack Algorithm for Optimized Resource Allocation #62

Open SOHAIB-code-png opened 2 weeks ago

SOHAIB-code-png commented 2 weeks ago

Implement the Knapsack Algorithm to solve the problem of optimized resource allocation based on given weights and values. The algorithm should support both 0/1 Knapsack and Fractional Knapsack variations, allowing for flexible item selection based on capacity constraints.

Key Features: 0/1 Knapsack: Include or exclude items with integer constraints. Fractional Knapsack: Allow partial selection of items. Implement efficient time complexity (Dynamic Programming or Greedy approach based on the problem type). Create modular functions for the algorithm for ease of integration. Include unit tests to verify correctness of the implementation for different edge cases.

Expected Outcomes: Efficient resource optimization based on defined weights and capacities. Clear and documented code that can be extended for various use cases.

shrutipuskar commented 2 weeks ago

plz assign this task to me and also add hactoberfest tag........