Help for this page

Select Code to Download


  1. or download this
    use Algorithm::Diff qw( LCS_length );
    
    ...
        my ($lsa, $lsb) = @_;
        return LCS_length($lsa, $lsb) == @$lsa;
    }
    
  2. or download this
    sub in_list {
        # Returns true if lsa is a proper subsequence of lsb
    ...
            ++( $lsa->[$ia] eq $lsb->[$ib] ? $ia : $ib );
        }
    }