You are viewing a single comment's thread. Return to all comments →
I solved it in the same manner. O(2xN) is O(N). This does not need DP at all.
Seems like cookies are disabled on this browser, please enable them to open this website
Candies
You are viewing a single comment's thread. Return to all comments →
I solved it in the same manner. O(2xN) is O(N). This does not need DP at all.