How to solve this

4 babbaba ab dictate acid abc p q. here test cases given is 4 and each test case should have 2 input strings then why there in total only 7 input instead of 8

4
babbaba
ab
dictate
acid

abc
p
q

these are 8 i/p
one of them is a empty string

please check this code also it is array and recursion based problem. https://ide.codingblocks.com/s/244843 . in this question we need to find the maximum subarray sum and subsequence sum. subarray sum is correct but in subsequence sum it gives segmentation fault. i tried to do this same as that in recursion problems

1 Like

dont know why code wth int arrya is not workng also u forgot to use return in base case( still code gives error)
shared code using vector

thanks for help. all my doubts gets cleared now

1 Like