##
The painter’s partition problem
November 19, 2017

We have to paint n boards of length {A1, A2…An}. There are k painters available and each takes 1 unit time to paint 1 unit… Read More »

November 19, 2017

We have to paint n boards of length {A1, A2…An}. There are k painters available and each takes 1 unit time to paint 1 unit… Read More »

November 13, 2017

Given a number of at most 100 digits. We have to check if it is possible, after removing certain digits, to obtain a number of… Read More »

November 1, 2017

Given a 2D array, find the minimum sum submatrix in it. Examples: Input : M[][] = {{1, 2, -1, -4, -20}, {-8, -3, 4, 2,… Read More »

October 31, 2017

Given an array and a number k, find a subsequence such that Sum of elements in subsequence is maximum Indices of elements of subsequence differ… Read More »

October 29, 2017

Given an array of n integers and q queries, print the number of next greater elements to the right of the given index element. Examples:… Read More »

October 19, 2017

Given a string S, find the length of longest balanced subsequence in it. A balanced string is defined as:- A Null string is a balanced… Read More »

A stable tower of height n is a tower consisting of exactly n tiles of unit height stacked vertically in such a way, that no… Read More »

October 18, 2017

Consider a coding competition on geeksforgeeks practice. Now their are n distinct participants taking part in the competition. A single participant can make pair with… Read More »

October 16, 2017

iven a number n, count number of strings of length n such that every string has adjacent characters with difference between ASCII values as 1.… Read More »

October 10, 2017

Given a string, print the longest repeating subseequence such that the two subsequence don’t have same string character at same position, i.e., any i’th character… Read More »

October 9, 2017

A tree with N nodes and N-1 edges is given with 2 different colours for its nodes. Find the sub-tree with minimum colour difference i.e.… Read More »

October 8, 2017

Given an array containing only 0s and 1s. For each index ‘i‘(0 index), find length of the longest alternating sub-array starting from ‘i‘ to ‘j‘… Read More »

October 5, 2017

Given two sequence P and Q of numbers. The task is to find Longest Common Subsequence of two sequence if we are allowed to change… Read More »

Given a non negative array, find the number of subsequences having product smaller than K. Examples: Input : [1, 2, 3, 4] k = 10… Read More »

October 2, 2017

We are given N items which are of total K different colors. Items of the same color are indistinguishable and colors can be numbered from… Read More »