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

# Tag Archives: LCS

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 N and M 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 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

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