## Fractional Knapsack Queries

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 »

- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Maximize the happiness of the groups on the Trip
- 0-1 knapsack queries
- Unbounded Fractional Knapsack
- Fractional Knapsack Queries
- Maximum items that can be filled in K Knapsacks of given Capacity
- Find maximum topics to prepare in order to pass the exam

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 »

There are n people and two identical voting machines. We are also given an array a[] of size n such that a[i] stores time required… Read More »

Given a knapsack weight W and a set of n items with certain value vali and weight wti, we need to calculate minimum amount that… Read More »

You are given a bag of size W kg and you are provided costs of packets different weights of oranges in array cost[] where cost[i]… Read More »

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

Given an integer array, find number of ways to calculate a target number using only array elements and addition or subtraction operator. Example: Input: arr[]… Read More »