Please Help Painting the Array I

Revision en6, by kbhattar, 2021-06-06 10:48:34

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

Tags #recursion,dp, #memoization

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English kbhattar 2021-06-06 10:49:09 0 (published)
en6 English kbhattar 2021-06-06 10:48:34 12 Tiny change: 'ecursion. ![ ](https://' -> 'ecursion. [Problem link](https://'
en5 English kbhattar 2021-06-06 10:47:57 177
en4 English kbhattar 2021-06-06 10:46:27 146
en3 English kbhattar 2021-06-06 10:46:03 123
en2 English kbhattar 2021-06-06 10:45:09 111
en1 English kbhattar 2021-06-06 10:43:54 320 picture (saved to drafts)