Skip to content

Category Archives: Greedy

A new variety of rice has been brought in supermarket and being available for the first time, the quantity of this rice is limited. Each… Read More
Given an array of n integers. We need to reduce size of array to one. We are allowed to select a pair of integers and… Read More
Given an amount, find the minimum number of notes of different denominations that sum upto the given amount. Starting from the highest denomination note, try… Read More
Given an array of non-negative integers. Our task is to find minimum number of elements such that their sum should be greater than the sum… Read More
We have discussed one loss minimization strategy before: Job Sequencing Problem – Loss Minimization. In this article, we will look at another strategy that applies… Read More
Given the length, breadth, height of a cuboid. The task is to divide the given cuboid in minimum number of cubes such that size of… Read More
Given an array of non-negative integers of length N and an integer k. Partition the given array into two subarrays of length K and N… Read More
We are given a matrix that contains different values in each cell. Our aim is to find the minimal set of positions in the matrix… Read More
We are given n-platform and two main running railway track for both direction. Trains which needs to stop at your station must occupy one platform… Read More
Given a list of n integers containing numbers 1-n in a shuffled way and a integer K. N people are standing in a queue to… Read More
Prerequisite: Page Replacement Algorithms In operating systems, whenever a new page is referred and not present in memory, page fault occurs and Operating System replaces… Read More
Find the minimum sum of Products of two arrays of the same size, given that k modifications are allowed on the first array. In each… Read More
We are given N jobs numbered 1 to N. For each activity, let Ti denotes the number of days required to complete the job. For… Read More
Given an array A[] of n-elements. We need to select two adjacent elements and delete the larger of them and store smaller of them to… Read More
Given n, print the maximum number of composite numbers that sum up to n. First few composite numbers are 4, 6, 8, 9, 10, 12,… Read More