Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
Arrays
6.5K+ articles
Strings
3.3K+ articles
Searching
1.7K+ articles
Dynamic Programming
1.6K+ articles
Recursion
1.0K+ articles
subsequence
434+ articles
LIS
61+ articles
LCS
1.3K+ posts
Recent Articles
Popular Articles
Length of longest common prime subsequence from two given arrays
Last Updated: 17 February 2023
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...
read more
Dynamic Programming
Searching
Recursion
DSA
subsequence
LCS
Prime Number
Minimize elements to be added to a given array such that it contains another given array as its subsequence
Last Updated: 14 April 2023
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 of elements to be added to the ...
read more
Dynamic Programming
Searching
DSA
Arrays
subsequence
LCS
array-rearrange
Minimize elements to be added to a given array such that it contains another given array as its subsequence | Set 2
Last Updated: 20 May 2021
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 of elements to be added to the ...
read more
Dynamic Programming
Searching
Mathematical
DSA
Arrays
Google
Binary Search
interview-preparation
LIS
LCS
Minimum cost required to rearrange a given array to make it equal to another given array
Last Updated: 28 February 2022
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 required to make the sequence A exactly th...
read more
Dynamic Programming
DSA
Arrays
subsequence
LIS
LCS
array-rearrange
Longest Common Subsequence of two arrays out of which one array consists of distinct elements only
Last Updated: 04 August 2022
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:Input: firstArr[]...
read more
Algorithms
Dynamic Programming
Searching
Mathematical
Hash
Technical Scripter
Technical Scripter 2020
DSA
Arrays
Binary Search
subsequence
LIS
LCS
cpp-map
Longest Common Subsequence (LCS) by repeatedly swapping characters of a string with characters of another string
Last Updated: 27 May 2021
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 can be two strings if any character from s...
read more
Misc
Strings
Hash
DSA
subsequence
LCS
frequency-counting
Maximize [length(X)/2^(XOR(X, Y))] by choosing substrings X and Y from string A and B respectively
Last Updated: 19 September 2023
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 eq...
read more
Dynamic Programming
Experienced
DSA
Arrays
LCS
Experiences
Minimize operations to delete all elements of permutation A by removing a subsequence having order as array B
Last Updated: 23 January 2023
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 remove all array elements A[] suc...
read more
Misc
Mathematical
DSA
Arrays
permutation
LCS
Natural Numbers
Maximize given function by selecting equal length substrings from given Binary Strings
Last Updated: 06 November 2023
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:fun(s1, s2) = len(...
read more
Strings
Greedy
DSA
binary-string
LCS
Find the Longest Common Subsequence (LCS) in given K permutations
Last Updated: 15 December 2021
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 K permutations.Examples:Input: N = 4, K = 3a...
read more
Misc
Pattern Searching
Mathematical
Combinatorial
Matrix
DSA
Arrays
permutation
LCS
Minimize partitions in given string to get another string
Last Updated: 02 March 2023
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 not possible to get B from A, then print "-1".Exampl...
read more
Strings
Algo Geek
Algo-Geek 2021
DSA
LCS
Longest Common Subsequence with no repeating character
Last Updated: 24 May 2022
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= "aabbcc", s2= "aabc"Output: 3...
read more
Strings
Recursion
DSA
LCS
Length of Longest Common Subsequence with given sum K
Last Updated: 03 April 2023
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 of elements is equal to K.Examples:Input: a[]...
read more
Dynamic Programming
Recursion
DSA
Arrays
subsequence
LCS
Memoization
POTD Solutions | 13 Nov’ 23 | Shortest Common Supersequence
Last Updated: 22 November 2023
View all POTD SolutionsWelcome to the daily solutions of ourPROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an optim...
read more
Strings
Dynamic Programming
DSA
LCS
Algorithms-Dynamic Programming
GFG-POTD-Solutions
DP Standard Problem Variations
Last Updated: 02 December 2024
When we solve Dynamic Programming problems, we try to find a pattern by matching pattern with a standard DP problem. This is generally recommended to solve new DP problems...
read more
Dynamic Programming
DSA
Fibonacci
LIS
LCS
catalan
binomial coefficient
1
2
3
4
...
90
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !