Implimented a different algorithm in the largest_common_subsequence method