Skip to content

Tag Archives: LCS

Given two strings X and Y, and two values costX and costY. We need to find minimum cost required to make the given two strings… Read More
Given a string, find out if the string is K-Palindrome or not. A K-palindrome string transforms into a palindrome on removing at most k characters… Read More
Given two strings X and Y, print the shortest string that has both X and Y as subsequences. If multiple shortest supersequence exists, print any… Read More
Prerequisites : LCS, LISGiven two arrays, find length of the longest common increasing subsequence [LCIS] and print one of such sequences (multiple sequences may exist)Suppose… Read More
Given a string, find out if the string is K-Palindrome or not. A k-palindrome string transforms into a palindrome on removing at most k characters… Read More
Given two strings, find the length of the longest subsequence present in both of them.   Examples:  LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH”… Read More
Given two strings str1 and str2, the task is to find the length of the shortest string that has both str1 and str2 as subsequences.… Read More
Given two sequences, print the longest subsequence present in both of them. Examples: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3.… Read More
  We have discussed Overlapping Subproblems and Optimal Substructure properties in Set 1 and Set 2 respectively. We also discussed one example problem in Set… Read More
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in… Read More
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in… Read More
LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in… Read More