Print LCS program

here my program for LCS its working fine in other online ide( codechef ) but it is giving segment fault whenever i am trying to submit it.

Hey


check if it works now.
There’s only one change on line no 7
I just initialised every string of the 2-D array with a blank string. and used vector instead of 2D array which is better, though you can also use 2D array

ya it’s working now. Thanks

1 Like