About the lcs prblm

what is meant by transition time?
I didn’t understand why the strings should be passed by reference and not value like how and why will the time complexity increase to O(N^3)?

Hello @Senjuti256 the strings should be pass by reference so that it should not create the new string for every call from the main and hence it keeps record on the same string.
Happy Learning!!

What will be the prblm if it creates new string for every call?

@Senjuti256 where you have the conceot if transition timing?
Transition timing is the timing from one systems state to another system state.

@Senjuti256 Then it will have to calculate for every new string.
if it has done some operations for some strings then it have to do again for them. then it will take more time and more space.

In the video they mentioned about transition time. So in this prblm is the lookup time for a value in the dp array means it’s transition time?

Hello @Senjuti256 Yes, we can say.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.