If we define a magic number between two strings A and B as longest common subsequence of A and B. then what would be the magic number for a pair of string A=”AGGTAB” , B=”GXTXAYB”?
4
5
7
6
If we define a magic number between two strings A and B as longest common subsequence of A and B. then what would be the magic number for a pair of string A=”AGGTAB” , B=”GXTXAYB”?
4
5
7
6
mujhe question hi samajh nai aya.
isme, GTAB ke beech meh XXY hai. So, I don’t get it.
@Kinjal you have to find subsequence not substring.
substring needs to be continuous while subsequence do not
subsequences of abcd can be abc, ad, acd … while substring abcd , bcd, cd …
Got it.
Bhaiya, I don’t know about KMP, can you give a some sort of understanding about KMP?
I felt very hard to understand. But, okay. Thanks.