can you please tell me why is zero coming in end place of my output.
Code link : https://ide.codingblocks.com/s/105528
DP code for lcs
Instead of using vector, try using char array in your code,
int index=dp[m][n];
char lcs[index+1];
lcs[index]=’ ';
Use this kind of approach instead,
sorry mam i didnt get you i mean how can i initilalize the value of the index as dp[n][m] as the value of dp[n][m] will be known after the exit of the loop is their any way so that i can store the character in side the loop whenever the character becomes equal please explain it once and tell me the changes in my code .
I have request for chat, plz see to it.