Longest Common Subsequence of two arrays out of which one array consists of distinct elements only
Given two arrays firstArr[], consisting of distinct elements only, and secondArr[], the task is to find the length of LCS between these 2 arrays....
read more
Maximum number of envelopes that can be put inside other bigger envelopes
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 if and only if both the width and height of one envelope is greater than the width and height of the other envelope. Find the maximum number of envelopes that can be put inside another envelope and so on. Rotation of envelope is not allowed....
read more
LCS (Longest Common Subsequence) of three strings
Given 3 strings of all having length < 100,the task is to find the longest common sub-sequence in all three given sequences....
read more
Print Longest Palindromic Subsequence
Given a sequence, print a longest palindromic subsequence of it....
read more
Longest Common Subsequence (LCS)
Given two strings, S1 and S2, the task is to find the length of the Longest Common Subsequence, i.e. longest subsequence present in both of the strings....
read more
Maximize [length(X)/2^(XOR(X, Y))] by choosing substrings X and Y from string A and B respectively
Given two binary strings A and B of size N and M respectively, the task is to maximize the value of the length of (X) / 2XOR(X, Y) by choosing two substrings X and Y of equal length from the given string A and B respectively....
read more
Length of longest common prime subsequence from two given arrays
Given two arrays arr1[] and arr2[] of length N and M respectively, the task is to find the length of the longest common prime subsequence that can be obtained from the two given arrays....
read more
Maximize given function by selecting equal length substrings from given Binary Strings
Given two binary strings s1 and s2. The task is to choose substring from s1 and s2 say sub1 and sub2 of equal length such that it maximizes the function:...
read more
Number of ways to insert a character to increase the LCS by one
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 length of the Longest Common Subsequence between string A and string B by 1....
read more
Count common subsequence in two strings
Given two string S and T. The task is to count the number of the common subsequence in S and T....
read more
Printing Longest Common Subsequence
Given two sequences, print the longest subsequence present in both of them....
read more
Longest Common Subsequence | DP using Memoization
Given two strings s1 and s2, the task is to find the length of the longest common subsequence present in both of them....
read more