Given two arrays a[] and b[] and an integer K, the task is to find the length of the longest common subsequence such that sum… Read More

# Tag Archives: LCS

Given two strings s1 and s2, the task is to find the length of the longest common subsequence with no repeating character. Examples: Input: s1=… Read More

Given two strings A and B, print the minimum number of slices required in A to get another string B. In case, if it is… Read More

Given K permutations of numbers from 1 to N in a 2D array arr[][]. The task is to find the longest common subsequence of these… Read More

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… Read More

Given two permutation arrays A[] and B[] of the first N Natural Numbers, the task is to find the minimum number of operations required to… Read More

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)… Read More

Given two strings A and B of lengths N and M respectively, the task is to find the length of the longest common subsequence that… Read More

Given two arrays firstArr[], consisting of distinct elements only, and secondArr[], the task is to find the length of LCS between these 2 arrays. Examples:… Read More

Given two arrays A[] and B[] consisting of M and N integers respectively, and an integer C, the task is to find the minimum cost… Read More

Given an array A[] consisting of N distinct integers and another array B[] consisting of M integers, the task is to find the minimum number… Read More

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… Read More

Given two arrays A[] and B[], the task is to find the maximum number of uncrossed lines between the elements of the two given arrays.… Read More

Given two Strings S and T of length N consisting of lowercase alphabets, which are permutations of each other, the task is to print the… Read More