I have solved some DP questions and mostly using 2D array DP. Noticed in solution section that it can be further optimised to 1D array DP for some questions like the coin change 1, 2 problems.
When to Convert a 2-D DP Array To 1-D DP Array And How can we do it, how should the logical thinking for optimising to 1D DP be.
Also in interviews/test would it make any difference in answering using 1D DP or 2D DP?
Thanks in advance!

Comments (0)