Find the longest subsequence
that is also a
subsequence of Y:
Y = BBAB
BAA Not subsequence
AA Not subsequence
BA YES ! Subsequence
Running time for the Brute Force method
# of subsequences:
X = x0 x1 x2 .... xn-1
Subsequence: pick x0 OR do not pick x0
pick x1 OR do not pick x1
....
pick xn-1 OR do not pick xn-1
=====> O(2n) # subsequence !!!