kbhattar's blog

By kbhattar, history, 3 years ago, In English

Hello I am getting TLE using Memorization in Recursion. Problem link

Please see the image for my though process. S1, S2 are subsequences and their values. The idea is to branch out based on the current value of the input array item. Annotated values in blue represent array item and in green represent max size of both subsequences together.

Thank you

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?