https:https://leetcode.com/problems/longest-common-subsequence///ide.codingblocks.com/s/378819
Help me out in this
Ok wait let me check
Pass strings by reference and it will work
I think u already know the reason of TLE now 
If this resolves ur query then please mark it as resolved 