## Tile Stacking Problem

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

Given a matrix of N rows and M columns. From m[i][j], we can move to m[i+1][j], if m[i+1][j] > m[i][j], or can move to m[i][j+1]… Read More »

Given a m x n matrix mat[][] containing positive integers. The problem is to reach to the cell (m-1, n-1) from the cell (0, 0)… Read More »

Given a matrix of size N X M consisting of ‘#’, ‘.’ and ‘*’. ‘#’ means blocked path, ‘.’ means walkable path and ‘*’ means… Read More »

We are given two arrays, we need to find the longest possible bitonic sequence such that increasing part must be from first array and should… Read More »

Given a binary matrix. The problem is to find the largest area rectangular sub-matrix with equal number of 1’s and 0’s. Examples: Input : mat[][]… Read More »

Given an array of positive integers. For every element x of array, we need to find the value of continuous floor function defined as F(x)… Read More »