strivedi4u / hacktoberfest2024

This repository is for beginners who want to contribution in open source Hacktoberfest 2024.This project is designed to promote learning and growth in the field of software development. It offers a range of coding challenges and projects that cover various topics, from basic algorithms to complex application development.
Apache License 2.0
87 stars 548 forks source link

12. 0/1 Knapsack Problem #16

Open strivedi4u opened 1 month ago

strivedi4u commented 1 month ago

Description: Solve the 0/1 knapsack problem where you are given weights and values of n items, and a knapsack of capacity W. Find the maximum value you can carry in the knapsack. Input: An array of weights, an array of values, and the knapsack capacity W. Output: The maximum value that can be achieved. Example:

Input: weights = [1, 3, 4, 5], values = [1, 4, 5, 7], W = 7  
Output: 9
SpoorthiGTalanki commented 1 month ago

please assign this issue to me

AnshDwivedi03 commented 1 month ago

Added 0/1 Knapsack solution @strivedi4u please merge

thenormalcoder commented 1 month ago

I really want to get this experience so assign me this issue so that I can jump into this new open source world...