## 0/1 Knapsack using Least Count Branch and Bound

Given N items with weights W[0..n-1], values V[0..n-1] and a knapsack with capacity C, select the items such that: The sum of weights taken into… Read More »

Given N items with weights W[0..n-1], values V[0..n-1] and a knapsack with capacity C, select the items such that: The sum of weights taken into… Read More »

Given S stacks of length M, the task is to maximize the sum of elements at the top of each stack by popping at most… Read More »

Given N items, each item having a given weight Ci and a profit value Pi, the task is to maximize the profit by selecting a… Read More »

Given weights and profits of N items, put these items in a knapsack of capacity W. The task is to print all possible solutions to… Read More »

Given a knapsack with capacity C and two arrays w[] and val[] representing the weights and values of N distinct items, the task is to… Read More »

Given an integer array, consisting of positive weights “W” and there values “V” respectively as a pair and some queries consisting of an integer ‘C’… Read More »

Given weights and values of n items, the task is to put these items in a knapsack of capacity W to get the maximum total… Read More »

Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements… Read More »

A trip to mystical land is going to be organized in ByteLand, the city of Bytes. Unfortunately, there are limited seats say A and there… Read More »

Given an integer array W[] consisting of weights of items and ‘K’ knapsacks of capacity ‘C’, find maximum weight we can put in the knapsacks… Read More »

Given an integer array W[] consisting of weights of the items and some queries consisting of capacity C of knapsack, for each query find maximum… Read More »

Given three integer n, h and p where n is the number of topics, h is the time left (in hours) and p is the… Read More »

A Greedy algorithm is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious… Read More »

Given an array ‘arr’ containing the weight of ‘N’ distinct items, and two knapsacks that can withstand ‘W1’ and ‘W2’ weights, the task is to… Read More »

Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.… Read More »