def lcsseq(self, src, tar):
lengths = np_zeros((len(src) + <NUM_LIT:1>, len(tar) + <NUM_LIT:1>), dtype=np_int)<EOL>for i, src_char in enumerate(src):<EOL><INDENT>for j, tar_char in enumerate(tar):<EOL><INDENT>if src_char == tar_char:<EOL><INDENT>lengths[i + <NUM_LIT:1>, j + <NUM_LIT:1>] = lengths[i, j] + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>lengths[i + <NUM_LIT:1>, j + <NUM_LIT:1>] = max(<EOL>lengths[i + <NUM_LIT:1>, j], lengths[i, j + <NUM_LIT:1>]<EOL>)<EOL><DEDENT><DEDENT><DEDENT>result = '<STR_LIT>'<EOL>i, j = len(src), len(tar)<EOL>while i != <NUM_LIT:0> and j != <NUM_LIT:0>:<EOL><INDENT>if lengths[i, j] == lengths[i - <NUM_LIT:1>, j]:<EOL><INDENT>i -= <NUM_LIT:1><EOL><DEDENT>elif lengths[i, j] == lengths[i, j - <NUM_LIT:1>]:<EOL><INDENT>j -= <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>result = src[i - <NUM_LIT:1>] + result<EOL>i -= <NUM_LIT:1><EOL>j -= <NUM_LIT:1><EOL><DEDENT><DEDENT>return result<EOL>
Return the longest common subsequence of two strings.

        Based on the dynamic programming algorithm from
        http://rosettacode.org/wiki/Longest_common_subsequence
        :cite:`rosettacode:2018b`. This is licensed GFDL 1.2.

        Modifications include:
            conversion to a numpy array in place of a list of lists

        Parameters
        ----------
        src : str
            Source string for comparison
        tar : str
            Target string for comparison

        Returns
        -------
        str
            The longest common subsequence

        Examples
        --------
        >>> sseq = LCSseq()
        >>> sseq.lcsseq('cat', 'hat')
        'at'
        >>> sseq.lcsseq('Niall', 'Neil')
        'Nil'
        >>> sseq.lcsseq('aluminum', 'Catalan')
        'aln'
        >>> sseq.lcsseq('ATCG', 'TAGC')
        'AC'