The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+4 votes
1.3k 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 (103k points)
recategorized | 1.3k 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 (48.5k points)
+1 vote
$< b, c, b, a>$ is answer

Option d
by Veteran (62.5k points)

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
50,362 questions
55,786 answers
192,411 comments
90,920 users