The_Elephant's blog

By The_Elephant, history, 3 weeks ago, In English

This is one of the new added problem for dp(dynamic programming) on cses.

Task : Link

It is similar to 0/1 knapsack or subset sum equal to k. I have solved this problem using a single array.

TC : O(N*M)
SC : O(M)

Solution
Code

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it