Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Dynamic Programming LCS subsequence

A Space Optimized Solution of LCS

Given two strings, find the length of longest subsequence present in both of them. Examples: LCS for input Sequences “ABCDGH” and “AEDFHR&#x201D...
Dynamic Programming Strings LCS

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. Examples: Input : str1 = "geeks&q...
Dynamic Programming Strings LCS

LCS formed by consecutive segments of at least length K

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 : s1 = aggayxysdfa ...
Arrays Dynamic Programming LCS

Longest Common Increasing Subsequence (LCS + LIS)

Prerequisites : LCS, LIS Given two arrays, find length of the longest common increasing subsequence [LCIS] and print one of such sequences (multiple sequences may ex...
Dynamic Programming Strings LCS

Count ways to increase LCS length of two strings by one

Given two strings of lower alphabet characters, we need to find the number of ways to insert a character in the first string such that length of LCS of both strings i...
Dynamic Programming Strings LCS

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 ...

Subscribe to Our Newsletter