## Longest Repeated Subsequence

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

- Check if a word exists in a grid or not
- Sum of XOR of all subarrays
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Longest subsequence such that adjacent elements have at least one common digit
- Make Binary Search Tree
- Samsung Interview Experience through Co-cubes (2019)
- Optimal Strategy for a Game | Set 2
- Minimum distance to the end of a grid from source
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Double Knapsack | Dynamic Programming
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Longest path in a directed Acyclic graph | Dynamic Programming
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Maximum subarray sum by flipping signs of at most K array elements
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Count of Numbers in Range where first digit is equal to last digit of the number
- Bellman Ford Algorithm (Simple Implementation)
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Find sub-matrix with the given sum
- Maximum sum such that no two elements are adjacent | Set 2
- Minimum steps to delete a string by deleting substring comprising of same characters
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Count number of ways to reach a given score in a Matrix
- Count of sub-sets of size n with total element sum divisible by 3
- DP on Trees | Set-3 ( Diameter of N-ary Tree )
- Sum of bitwise AND of all submatrices
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Number of Binary Strings of length N with K adjacent Set Bits

Given a string, print the longest repeating subsequence 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 »

Given an array of N positive integers. We are allowed to remove element from either of the two ends i.e from the left side or… Read More »

Given a binary matrix of R rows and C columns. We are allowed flip to any size of sub matrix. Flipping means changing 1 to… Read More »

Given an array of n integers, count all different triplets whose sum is equal to the perfect cube i.e, for any i, j, k(i <… Read More »