Hi,
I understood both the DP solution where we use 2D array dp[][] to build the solution. But then the DP challenger says that the complexity can be reduced further to O© by traversing the capacity loop in the reverse direction.
But my question is still we are having 2 loops. Am I missing something here?
I think the question is to reduce the SPACE Complexity not the TIME Complexity.
“### Challenge
Can we further improve our bottom-up DP solution? Can you find an algorithm that has O©O© space complexity?”