Need Help | Atcoder | DP | recursive | python3

Правка en1, от faisal_sohail, 2020-08-04 22:28:19

hello there, i am facing problem in solving dp using top down approach.

`problem 1`

i tried to solve this problem using DP Top down approach (recursively with memoization). got Accepted when submitted this_solution while it gave TLE for other_solution i tried to figure out the reason behind but failed . curious to know, why my second solution gave TLE. ``

` problem 2:`

i tried to solve this_problem of Atcoder using top_down approach,but it shows TLE for two sub-tasks> my_solution_link am i missing any edge case or it just because of recursion or Python?

any help is highly appreciated. along with that i will be glad if u would do code review and suggest ways to make my coding more effective and readable

Thanks a ton in advance. Happy coding

Теги python3, #help, dp with recursion, #atcoder

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский faisal_sohail 2020-08-04 22:28:19 1145 Initial revision (published)