The Gateway to Computer Science Excellence
+4 votes
1.6k views

Given two sequences X and Y:

X=$\langle$ a, b, c, b, d, a, b $\rangle$

Y=$\langle$ b, d, c, a, b, a $\rangle$

The longest common subsequence of X and Y is:

  1. $\langle$ b, c, a $\rangle$
  2. $\langle$ c, a, b $\rangle$
  3. $\langle$ b, c, a, a $\rangle$
  4. $\langle$ b, c, b, a $\rangle$
in Algorithms by Veteran
recategorized | 1.6k views
0
How to find long common subsequences.

2 Answers

+2 votes

ans is D simply observe the longest sequence in order (not essentially continuous)common in both 

X=⟨ a, b, c, b, d, a, b ⟩

Y=⟨ b, d, c, a, b, a ⟩

(b,c,b,a)

by Boss
+1 vote
$< b, c, b, a>$ is answer

Option d
by Veteran

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,218 questions
59,890 answers
201,085 comments
118,128 users