Search found 1 match

by anan_xon
Sun Aug 14, 2011 6:31 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 44459

Re: 10405 - Longest Common Subsequence......getting CA...plz

#include<iostream>
using namespace std;

int len(char *a)
{
int i=0;
while(a !=0)i++;
return i;
}

int lcs(char *s,char *t)
{
int **table;
int i,j;
int max=0;

int m=len(s);
int n=len(t);
table=new int*[m+1];
for(i=0;i<=m;i++)table =new int[n+1];


for(i=0;i<=m;i++)
{
for(j=0;j<=n;j ...

Go to advanced search