How can i space optimize this ?

Правка en2, от Aniket54, 2024-03-30 21:28:43

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.

Теги dp, more dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Aniket54 2024-03-30 21:28:43 2 Tiny change: 'I'm gettin' -> '\nI'm gettin' (published)
en1 Английский Aniket54 2024-03-30 21:28:17 357 Initial revision (saved to drafts)