Click here to see the full article post
hello, I have a question. Why is the space complexity of the last solution (DP solution with 1-D arrays) of O(n)? I am confused because the temp array is being reinitialized in every iteration of the loop.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.