0 votes 0 votes The length of the longest common subsequence of $L = ( 1,0,0,1,0,1,0,1 )$ and $K =( 0,1,0,1,1,0,1,1,0 )$ is __________. Algorithms tbb-algorithms-2 numerical-answers + – Bikram asked May 26, 2017 • edited Aug 20, 2019 by Counsellor Bikram 331 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Shubham Aggarwal commented Dec 26, 2018 reply Follow Share @Bikram sir can you explain it. 0 votes 0 votes Prateek Raghuvanshi commented Dec 26, 2018 reply Follow Share @Shubham Aggarwal check it now . 0 votes 0 votes JashanArora commented Dec 30, 2019 reply Follow Share 010101 0 votes 0 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes It might be helpful to solve LCS problem. There are only three steps- 1)when either M=0 or N=0 means nothing to be match so value 0 2)From both string if matched then 1+LCS(M-1,N-1) means in table it will take value from (M-1,N-1)diagonal value +1. 3)no matching then it will take maximum value from either upper row element or immediate left element. Prateek Raghuvanshi answered Dec 26, 2018 • selected Aug 16, 2019 by Bikram Prateek Raghuvanshi comment Share Follow See 1 comment See all 1 1 comment reply Shubham Aggarwal commented Dec 26, 2018 reply Follow Share @Prateek Raghuvanshi thanks bro for your valuable efforts. i have just little doubt now all are clear. again thanx 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes The longest sub sequences will be 101101 101010 both of them are of length 6. chap24 answered Sep 14, 2017 • edited Sep 15, 2017 by chap24 chap24 comment Share Follow See all 0 reply Please log in or register to add a comment.