How can i space optimize this ?

Revision en1, by Aniket54, 2024-03-30 21:28:17

I'm getting MLE at test 33 here is the problem

and my submission

here i used LIS dp -> time O(N^2), space O(N^2) .... i don't know how to convert space to O(n) and also at the same time get a particular solution.

Tags dp, more dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Aniket54 2024-03-30 21:28:43 2 Tiny change: 'I'm gettin' -> '\nI'm gettin' (published)
en1 English Aniket54 2024-03-30 21:28:17 357 Initial revision (saved to drafts)