We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Personally, I think this should be in the "combinatorics" section, since there is a combinatorial method using O(1) space and O(N) time.
.
That said, I've been using the problems on this site to learn DP, and I cannot for the life of me understand the DP solution in the editorial. Without any more spoilers than I might have already incidentally revealed, does anyone have any further insight on the editorial solution? ... Perhaps a textbook which elaborates on the particular tool from the editorial?
Covering the stains
You are viewing a single comment's thread. Return to all comments →
Personally, I think this should be in the "combinatorics" section, since there is a combinatorial method using O(1) space and O(N) time.
.
That said, I've been using the problems on this site to learn DP, and I cannot for the life of me understand the DP solution in the editorial. Without any more spoilers than I might have already incidentally revealed, does anyone have any further insight on the editorial solution? ... Perhaps a textbook which elaborates on the particular tool from the editorial?