NeoAlgo icon indicating copy to clipboard operation
NeoAlgo copied to clipboard

Knapsack Problem in DP.

Open Nistha-tech opened this issue 6 years ago • 12 comments

0 1 Knapsack

A thief robbing a store and can carry a maximal weight of W into his knapsack. There are N items and ith item weigh wi and is value vi. What is the maximum value V, that thief can take ? Input Format : Line 1 : N i.e. number of items Line 2 : N Integers i.e. weights of items separated by space Line 3 : N Integers i.e. values of items separated by space Line 4 : Integer W i.e. maximum weight thief can carry Output Format : Line 1 : Maximum value V Constraints 1 <= N <= 20 1<= wi <= 100 1 <= vi <= 100 Sample Input 1 : 4 1 2 4 5 5 4 8 6 5 Sample Output : 13

Have you read the [Contributing Guidelines on Pull Requests] Yes

Happy Coding :)

Nistha-tech avatar Aug 16 '20 04:08 Nistha-tech

I will try to work on this issue in Cpp/Python as I'm well versed in both. Only if both cannot be provided I'll work with C as that is the label. Gopika Murali Participant at Contributor's Hack '20, HakinCodes

peeky1811 avatar Aug 16 '20 04:08 peeky1811

I would like to work on this issue in Cpp and Python as a part of HakinCodes @Kajol-Kumari .

Nistha-tech avatar Aug 16 '20 04:08 Nistha-tech

I would like to contribute in c++ as a part of HakinCodes 2020

pragyajaiswa05l avatar Aug 16 '20 04:08 pragyajaiswa05l

I would like to contribute in c++ as a part of HakinCodes 2020

vinayvyas911 avatar Aug 16 '20 04:08 vinayvyas911

I am assigning the Issue to you @pragyajaiswa05l in C++ and to @peeky1811 in Python

@Nistha-tech You cannot work on it yet, as you have two issues under your belt now.

HarshCasper avatar Aug 16 '20 05:08 HarshCasper

I would like to contribute in C language as a part of HakinCodes 2020

chandankrsahu avatar Aug 16 '20 05:08 chandankrsahu

I would like to work on this issue using the C and Java language. @Kajol-Kumari

neha07kumari avatar Aug 16 '20 06:08 neha07kumari

I would like to work on this issue in C++ as part of HaikinCodes Contributor's Hack 2020

Sreelakshmi00 avatar Aug 16 '20 06:08 Sreelakshmi00

Can I take it up in Java?

Huzaib avatar Aug 16 '20 06:08 Huzaib

I would love to solve knapsack problem in C or C++.

vishaljss2021 avatar Aug 16 '20 08:08 vishaljss2021

@HarshCasper @atarax665 is this issue still available in Java.

GrayFlash avatar Aug 27 '20 04:08 GrayFlash

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Telegram or ping one of the reviewers. Thank you for your contributions!

github-actions[bot] avatar Oct 27 '20 00:10 github-actions[bot]