# Tag Archives: LCS

Given N number of envelopes, as {W, H} pair, where W as the width and H as the height. One envelope can fit into anotherâ€¦ Read More
Given binary string S of size N and a number K. The task is to find the Longest sub string of 0’s in the stringâ€¦ Read More
Given two string S and Q. The task is to count the number of the common subsequence in S and T. Examples: Input : Sâ€¦ Read More
Given two numeric strings, A and B. A numeric string is a string that contains only digits [‘0’-‘9’].The task is to make both the stringsâ€¦ Read More
Given two strings X and Y of length m and n respectively. The problem is to find the length of the longest common subsequence ofâ€¦ Read More
In standard Edit Distance where we are allowed 3 operations, insert, delete, and replace. Consider a variation of edit distance where we are allowed onlyâ€¦ Read More
Given two strings s1 and s2, the task is to find the length of the longest common subsequence present in both of them. Examples:   Input:â€¦ Read More
Most of the Dynamic Programming problems are solved in two ways:   Tabulation: Bottom Up Memoization: Top Down One of the easier approaches to solve mostâ€¦ Read More
Given two strings s1, s2 and K, find the length of the longest subsequence formed by consecutive segments of at least length K. Examples:  Inputâ€¦ Read More
Given two strings A and B. The task is to count the number of ways to insert a character in string A to increase theâ€¦ Read More
Given two string X, Y and an integer k. Now the task is to convert string X with the minimum cost such that the Longestâ€¦ Read More
Given a sequence, print a longest palindromic subsequence of it.  Examples :  Input : BBABCBCAB Output : BABCBAB The above output is the longest palindromicâ€¦ Read More
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
Given two sequence P and Q of numbers. The task is to find Longest Common Subsequence of two sequences if we are allowed to changeâ€¦ Read More
Compute the shortest string for a combination of two given strings such that the new string consist of both the strings as its subsequences.Examples:   Inputâ€¦ Read More