Help for this page

Select Code to Download


  1. or download this
    sub lcs {
      my($x, $y) = @_;
    ...
      } 
      return $v[length($x) - 1][length($y) - 1];
    }
    
  2. or download this
    sub matchss {
      my($ss, $str) = @_;
    ...
      } 
      pop @state;
    }
    
  3. or download this
    sub lcscount {
      my($x, $y) = @_;
    ...
      );
      $count;
    }
    
  4. or download this
      $count += $seen{$_} * matchss($_, $y) for keys %seen;