I was solving dp educational contest of at coder problem F-LCS
You are never doing iā
while(i!=0&&j!=0)
{
if(s1[i-1]==s2[j-1])
{
res+=s1[i-1]; //res is string
j--;
i--;
}
else if(dp[i-1][j]==dp[i][j])
i--;
else
j--;
}
1 Like
but i m pushing char in stack
i think they are one of the same thing
Yeah I told that because I used string