##
Find smallest number with given number of digits and sum of digits
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 »

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 »

November 18, 2014

Given an array of jobs where every job has a deadline and associated profit if the job is finished before the deadline.

November 16, 2014

Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required for the railway station so… Read More »