Longest common subsequence

Can you please help me correct my code.

hello @rahul.gupta03111999
the logic is not correct.
first u need to prepare lcs dp table and then use that table to generate lcs string.
refer this for more details->link