Блог пользователя I_am_Vengeance

Автор I_am_Vengeance, история, 3 года назад, По-английски

Can anyone please explain how this problem can be solved in top-down manner (Recursive dp).

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор I_am_Vengeance, история, 3 года назад, По-английски

Is there any way to space optimize a recursive DP for example say the 0-1 knapsack problem where we can do it iteratively using a 2xN dp array iteratively. Recently I came across this probelem and this problem where I was forced to use an iterative DP. Is there any way to solve these problems recursively?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +26
  • Проголосовать: не нравится

Автор I_am_Vengeance, история, 3 года назад, По-английски

I am stuck in this problem, I and not able to identify why I am getting a TLE. My submission and the Problem Link

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится