Given a string of length n, a subsequence is any non empty subset of characters read from left to right. For example, if A = atc then a, t, c, at, tc, ac, atc are all subsequnces of A. Given two strings of length n, m, design an algorithm that outputs the length of the longest common subsequence (LCS) of the two strings.