edited by
6,172 views
4 votes
4 votes

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$
edited by

3 Answers

2 votes
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)

Answer:

Related questions

3 votes
3 votes
1 answer
2
2 votes
2 votes
2 answers
3
2 votes
2 votes
1 answer
4
go_editor asked Aug 9, 2016
4,295 views
If there are n integers to sort, each integer had d digits and each digit is in the set $\{1, 2, \dots, k\}$, radix sort can sort the numbers in$O(d \: n \: k)$$O(d n^k)$...