##
Maximize array sum after K negations | Set 1
October 20, 2016

Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation… Read More »

October 20, 2016

Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation… Read More »

June 7, 2016

Given a set of n jobs where each job i has a deadline di >=1 and profit pi>=0. Only one job can be scheduled at… Read More »

June 6, 2016

How to find the smallest number with given digit sum s and number of digits d? Examples : Input : s = 9, d =… Read More »

May 18, 2016

Given heights of n towers and a value k. We need to either increase or decrease height of every tower by k (only once) where… Read More »

April 11, 2016

Dijkstra’s shortest path algorithm runs in O(Elog V) time when implemented with adjacency list representation (See C implementation and STL based C++ implementations for details).… Read More »

March 23, 2016

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

March 3, 2016

Given n items of different weights and bins each of capacity c, assign each item to a bin such that number of total used bins… Read More »

October 4, 2015

Given an array of jobs with different time requirements. There are K identical assignees available and we are also given how much time an assignee… Read More »

August 19, 2015

Given a value V, if we want to make change for V Rs, and we have infinite supply of each of the denominations in Indian… Read More »

July 4, 2015

Given a set of n strings arr[], find the smallest string that contains each string in the given set as substring. We may assume that… Read More »

May 20, 2015

We have discussed following topics on Minimum Spanning Tree. Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm

March 27, 2015

Given a universe U of n elements, a collection of subsets of U say S = {S1, S2…,Sm} where every subset Si has an associated… Read More »

March 26, 2015

Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maximum… Read More »

February 4, 2015

Every positive fraction can be represented as sum of unique unit fractions. A fraction is unit fraction if numerator is 1 and denominator is a… Read More »

January 4, 2015

Given a number of friends who have to give or take some amount of money from one another. Design an algorithm by which the total… Read More »