Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged knapsack-problem
0
0 votes
1
1 answer
470
470 views
UGC NET CSE | August 2024 | Part 2 | Question: 48
Arrange the following steps in the correct order to solve the Knapsack problem using Dynamic Programming.Define the base case when the capacity is zero ($0$) or no items ...
Shubham Sharma 2
470
views
asked
Sep 9, 2025
Algorithms
ugcnetcse-aug2024
dynamic-programming
knapsack-problem
algorithm-design
data-structures
+
–
0
0 votes
1
1 answer
1.6k
1.6k views
Dynamic Programming
int max(int a, int b) { return (a b) ? a : b; }// Returns the maximum value that can be// put in a knapsack of capacity Wint knapSack(int W, int wt[], int val[], int n){...
ryandany07
1.6k
views
asked
Aug 18, 2022
Algorithms
algorithms
dynamic-programming
knapsack-problem
+
–
7
7 votes
1
1 answer
879
879 views
GO Classes CS Test Series | Algorithms | Topic Wise Test 4 | Question: 7
Consider the following $0-1$ knapsack problem with the item's weight and value given in the table.$$\begin{array}{c|cc} \text{item} & \text{weight} & \text{value} \\\hlin...
GO Classes
879
views
asked
Aug 16, 2022
Algorithms
goclasses_cs_algo_tw4
goclasses
algorithms
dynamic-programming
knapsack-problem
two-marks
+
–
0
0 votes
1
1 answer
1.7k
1.7k views
#aktu #aktu 2016-17
please provide the solution
Nitesh_Yadav
1.7k
views
asked
Dec 29, 2021
Algorithms
algorithms
knapsack-problem
+
–
0
0 votes
1
answers
1 answer
2.7k
2.7k views
Applied Test Series
Consider the following items with their associated weights and values. If a knapsack of capacity 25 units of weight is available and we are allowed to take either the ite...
LRU
2.7k
views
asked
Dec 28, 2021
Algorithms
test-series
knapsack-problem
algorithms
greedy-algorithms
+
–
0
0 votes
1
answers
1 answer
973
973 views
Applied Test Series: Knapsack Problem
The following table givens the frequency of 4 letters in a database of textIf Huffman encoding is used to encode the word “aaabca” the number of bits required for it is g...
ramakrushna
973
views
asked
Dec 25, 2021
Operating System
test-series
knapsack-problem
algorithms
+
–
0
0 votes
1
1 answer
710
710 views
Testbook Test Series
rsansiya111
710
views
asked
Dec 17, 2021
Algorithms
testbook-test-series
greedy-algorithms
knapsack-problem
+
–
1
1 vote
1
1 answer
1.1k
1.1k views
NIELIT Scientific Assistant A 2020 November: 64
Which of the following is a correct time complexity to solve the $0/1$ knapsack problem where $n$ and $w$ represents the number of items and capacity of knapsack respecti...
gatecse
1.1k
views
asked
Dec 9, 2020
Algorithms
nielit-sta-2020
algorithms
dynamic-programming
easy
knapsack-problem
time-complexity
+
–
2
2 votes
2
2 answers
9.5k
9.5k views
NIELIT 2016 DEC Scientist B (CS) - Section B: 7
The Knapsack problem belongs to which domain of problems?OptimizationNP completeLinear SolutionSorting
admin
9.5k
views
asked
Mar 31, 2020
Algorithms
nielit2016dec-scientistb-cs
algorithms
knapsack-problem
algorithm-design-techniques
+
–
1
1 vote
2
2 answers
3.6k
3.6k views
NIELIT 2017 July Scientist B (IT) - Section B: 60
$0/1$-Knapsack is a well known problem where, it is desired to get the maximum total profit by placing $n$ items (each item is having some weight and associated profit) i...
admin
3.6k
views
asked
Mar 30, 2020
Algorithms
nielit2017july-scientistb-it
algorithms
greedy-algorithms
knapsack-problem
+
–
0
0 votes
0
0 answers
1.0k
1.0k views
self doubt *0/1 knapsack problem*
In 0/1 knapsack problem ,suppose if maximum weight is given as W and we are asked to find out max profit then * IS IT NECESSARY THAT THE TOTAL WEIGHT SHOULD BE EXACTLY EQ...
karan25gupta
1.0k
views
asked
Apr 17, 2019
Algorithms
algorithms
dynamic-programming
knapsack-problem
+
–
0
0 votes
1
1 answer
1.0k
1.0k views
self doubt
Can we solve fractional knapsack using dynamic programming?
DIYA BASU
1.0k
views
asked
Feb 14, 2019
Algorithms
knapsack-problem
dynamic-programming
+
–
0
0 votes
0
0 answers
808
808 views
self_doubt
Is there any better approach to solve 0/1 knapsack problem other than tabular method ? as it consumes a lot of time when greater number of objects are given.
Shivam Kasat
808
views
asked
Jan 8, 2019
Algorithms
algorithms
knapsack-problem
+
–
0
0 votes
1
1 answer
1.5k
1.5k views
MadeEasyAlgo
Maximum profit using 0/1 Knapsack with W=200 is there any other than brute force method to solve this??? or we have to do only with tabular method?please solve and mentio...
Abhisek Tiwari 4
1.5k
views
asked
Dec 24, 2018
Algorithms
algorithms
dynamic-programming
knapsack-problem
numerical-answers
made-easy-booklet
+
–
0
0 votes
1
1 answer
814
814 views
Dynamic Programming
What is the best way to solve a 0/1 knapsack problem? Any trick to solve it without wasting much time?Not How to
CJ147
814
views
asked
Dec 3, 2018
Algorithms
dynamic-programming
knapsack-problem
+
–
1
1 vote
1
1 answer
874
874 views
ACE TEST SERIES QUESTION
Shankar Kakde
874
views
asked
Oct 1, 2018
Algorithms
knapsack-problem
algorithms
ace-test-series
+
–
0
0 votes
0
0 answers
325
325 views
Self doubt
How to solve fractional knapsack problem using heap ?
Prince Sindhiya
325
views
asked
Jul 22, 2018
Algorithms
algorithms
knapsack-problem
+
–
0
0 votes
1
1 answer
1.4k
1.4k views
Time complexity analysis
What will be the time complexity if fractional knapsack is implemented using min heap instead of sorted arraya) O(nlogn)b)O(n^2)c)O(n)d) none of these
Rohit Pandey
1.4k
views
asked
Jun 27, 2018
Algorithms
time-complexity
knapsack-problem
sorting
binary-heap
+
–
0
0 votes
1
1 answer
1.0k
1.0k views
Fractional Knapsack
Is fractional Kanpsack or knapsack problem in our GATE 2019 Syllabus
Na462
1.0k
views
asked
Apr 30, 2018
Algorithms
knapsack-problem
+
–
0
0 votes
0
0 answers
1.4k
1.4k views
General Topic Doubt: Algorithms - Dynamic Programming
Read the following statements about 0/1 Knapsack problem.(i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items.(ii) Time ...
VIKAS TIWARI
1.4k
views
asked
Dec 13, 2017
Algorithms
algorithms
dynamic-programming
knapsack-problem
general-topic-doubt
+
–
0
0 votes
1
answers
1 answer
9.2k
9.2k views
Knapsack
The following Knapsack bag. The Knapsack bag maximum Capacity is 50. Find out the maximum profit for Fractional Knapsack. PQRSTUVWWeight1812161416201015Profit341522161722...
Parshu gate
9.2k
views
asked
Nov 16, 2017
Algorithms
algorithms
greedy-algorithms
knapsack-problem
+
–
1
1 vote
0
0 answers
853
853 views
techtud
In the knapsack problem we are given a set of n items, where each item i is specified by a size si and a value vi. We are also given a size bound S (the size of our knaps...
Manoja Rajalakshmi A
853
views
asked
Nov 7, 2017
Algorithms
knapsack-problem
algorithms
+
–
2
2 votes
1
answers
1 answer
1.6k
1.6k views
knapsack problem what is answer to this anyone ??
Example 2.2 : Consider that there are three items. Weight and profit value of each item is as given below,\begin{tabular}{|c|c|c|}\hline $\mathbf{i}$ & $\mathbf{W}_{\math...
sumit goyal 1
1.6k
views
asked
Nov 7, 2017
Algorithms
algorithms
knapsack-problem
test-series
+
–
1
1 vote
1
1 answer
3.4k
3.4k views
Knapsack problem
5.Consider the Knapsack instance with 5 objects and a capacity M=11, profit P=(5,4,7,2,3) andweight W=(4,3,6,2,2.). Solve it using dynamic programming approach.
Syedabbas110
3.4k
views
asked
Oct 30, 2017
Algorithms
algorithms
knapsack-problem
dynamic-programming
+
–
1
1 vote
1
1 answer
652
652 views
algorithm
how is 0/1 knapsack time complexity O(2^n/2) ?
A_i_$_h
652
views
asked
Jul 25, 2017
Algorithms
knapsack-problem
time-complexity
+
–
0
0 votes
1
answers
1 answer
738
738 views
Test by Bikram | Algorithms | Test 2 | Question: 26
Consider the following instance of the knapsack problem :$\begin{array}{|c|c|c|c|c|c|} \hline \text{Item} & a & b & c & d & e \\ \hline \text{Benefit} & 15 & 12 & 9 & 16 ...
Bikram
738
views
asked
May 26, 2017
Algorithms
tbb-algorithms-2
numerical-answers
algorithms
greedy-algorithms
knapsack-problem
+
–
0
0 votes
1
answers
1 answer
5.3k
5.3k views
Fractional Knapsack(Greedy Method)
Consider the following instance of the knapsack problem: n=3 , W=50 , (v1,v2,v3) = (60,100,120) and weight (w1,w2,w3) = (10,20,30) .solve the given knapsack problem apply...
LavTheRawkstar
5.3k
views
asked
Apr 15, 2017
Algorithms
algorithms
knapsack-problem
greedy-algorithms
+
–
Page:
1
2
next »